Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install fail on windows 10 (node version 8.11.3) #894

Closed
r4ulill0 opened this issue Aug 7, 2018 · 2 comments
Closed

npm install fail on windows 10 (node version 8.11.3) #894

r4ulill0 opened this issue Aug 7, 2018 · 2 comments

Comments

@r4ulill0
Copy link

r4ulill0 commented Aug 7, 2018

I'm using node version 8.11.3 on windows 10 and I have installed Microsoft Visual C++ 2015 (x64).
I have Microsoft Visual C++ redistributables from 2005 to 2015.
When I try to install I get the following error:

$ npm install mapnik

> [email protected] install C:\Users\Usuario 1\Desktop\Raul\appPueblos\api\node_modules\mapnik
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/mapnik/v4.0.1/node-v57-win32-x64-Release.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
"mapnik-config" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
gyp: Call to 'mapnik-config --ldflags' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:336:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\Usuario 1\\Desktop\\Raul\\appPueblos\\api\\node_modules\\mapnik\\lib\\binding\\mapnik.node" "--module_name=mapnik" "--module_path=C:\\Users\\Usuario 1\\Desktop\\Raul\\appPueblos\\api\\node_modules\\mapnik\\lib\\binding" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd C:\Users\Usuario 1\Desktop\Raul\appPueblos\api\node_modules\mapnik
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\Usuario 1\Desktop\Raul\appPueblos\api\node_modules\mapnik\lib\binding\mapnik.node --module_name=mapnik --module_path=C:\Users\Usuario 1\Desktop\Raul\appPueblos\api\node_modules\mapnik\lib\binding --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\Usuario 1\Desktop\Raul\appPueblos\api\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Usuario 1\\Desktop\\Raul\\appPueblos\\api\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Usuario 1\Desktop\Raul\appPueblos\api\node_modules\mapnik
node-pre-gyp ERR! node -v v8.11.3
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\Usuario 1\Desktop\Raul\appPueblos\api\node_modules\mapnik\lib\binding\mapnik.node --module_name=mapnik --module_path=C:\Users\Usuario 1\Desktop\Raul\appPueblos\api\node_modules\mapnik\lib\binding --napi_version=3 --node_abi_napi=napi' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

Here is the complete log:
2018-08-07T07_23_57_402Z-debug.log

And I had a problem with 2015 MS package because it seems that 2017 package is detected as a duplicated of 2015 one so i had to uninstall 2017 package in order to install 2015.
Tell me if you need more info.

@Algunenano
Copy link
Contributor

Windows prebuilts are no supported maintained. You could either use the last built release for Windows (3.6.2) or build from source

@r4ulill0
Copy link
Author

r4ulill0 commented Aug 7, 2018

Thank you for your response, I will use 3.6.2 version. Maybe you should write this heads up at the install section of the README.md

@r4ulill0 r4ulill0 closed this as completed Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants