Sharp: npm install failed on Windows 8 x64 machine

Created on 29 Jun 2016  路  8Comments  路  Source: lovell/sharp

npm install --verbose sharp

.....
npmnode_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\var\www-archibiz\apinode_modules\sharp',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\var\www-archibiz\apinode_modules\sharp\build',
gyp info spawn args '-Goutput_dir=.' ]
ERROR: Download from https://dl.bintray.com/lovell/sharp/libvips-8.3.1-win.tar.gz failed: connect ETIMEDOUT 23.57.224.80:443
gyp: Call to 'node -e "require('./binding').download_vips()"' 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\nodejsnode_modules\npmnode_modules\node-gyp\lib\configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejsnode_modules\npmnode_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\var\www-archibiz\apinode_modules\sharp
gyp ERR! node -v v4.4.3
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm verb unsafe-perm in lifecycle true
npm info [email protected] Failed to exec install script
npm verb unlock done using C:\Users\FrameInn\AppData\Roaming\npm-cache_locks\sharp-683e23e2b0cbf2b0.lock for C:\var\www-archibiz\apinode_modules\sharp
npm verb stack Error: [email protected] install: node-gyp rebuild
npm verb stack Exit status 1
npm verb stack at EventEmitter. (C:\Program Files\nodejsnode_modules\npm\lib\utils\lifecycle.js:217:16)
npm verb stack at emitTwo (events.js:87:13)
npm verb stack at EventEmitter.emit (events.js:172:7)
npm verb stack at ChildProcess. (C:\Program Files\nodejsnode_modules\npm\lib\utils\spawn.js:24:14)
npm verb stack at emitTwo (events.js:87:13)
npm verb stack at ChildProcess.emit (events.js:172:7)
npm verb stack at maybeClose (internal/child_process.js:827:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
npm verb pkgid [email protected]
npm verb cwd C:\var\www-archibiz\api
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejsnode_modules\npm\bin\npm-cli.js" "install" "--verbose" "sharp"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the sharp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sharp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls sharp
npm ERR! There is likely additional logging output above.
npm verb exit [ 1, true ]
npm verb unbuild node_modules\sharp
npm info preuninstall [email protected]
npm info uninstall [email protected]
npm verb unbuild rmStuff [email protected] from C:\var\www-archibiz\apinode_modules
npm info postuninstall [email protected]
npm verb gentlyRm don't care about contents; nuking C:\var\www-archibiz\apinode_modules\sharp

npm ERR! Please include the following file with any support request:
npm ERR! C:\var\www-archibiz\api\npm-debug.log


I am not sure it went wrong. I have MSVC 13 installed.

question

Most helpful comment

@lovell Yes. Sorry. Actually MS build independent package doesn't install all necessary packages. You must install Vistual Studio to get node-gyp working. It wasn't package bug but windows. Hate windows. Moving to mac soon.

All 8 comments

I guess last error was because of network timeout. But Now, I am getting new error


Project "C:\var\www-archibiz\apinode_modules\sharp\build\binding.sln" on node
1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Release|x64".
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere. [C:\var\www-archibiz\apinode_modules\sharp\build\bind
ing.sln]
Done Building Project "C:\var\www-archibiz\apinode_modules\sharp\build\binding
.sln" (default targets) -- FAILED.

Build FAILED.

"C:\var\www-archibiz\apinode_modules\sharp\build\binding.sln" (default target)
(1) ->
(libvips-cpp target) ->
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe
". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Vis
ual Studio 2005 or 3) add the location of the component to the system path if i
t is installed elsewhere. [C:\var\www-archibiz\apinode_modules\sharp\build\bi
nding.sln]

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:00.14
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejsnode_modules\npmnode_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejsnode_modules\npmnode_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\var\www-archibiz\apinode_modules\sharp
gyp ERR! node -v v4.4.3
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm verb unsafe-perm in lifecycle true
npm info [email protected] Failed to exec install script
npm verb unlock done using C:\Users\FrameInn\AppData\Roaming\npm-cache_locks\sharp-683e23e2b0cbf2b0.lock for C:\var\www-archibiz\apinode_modules\sharp
npm verb stack Error: [email protected] install: node-gyp rebuild
npm verb stack Exit status 1
npm verb stack at EventEmitter. (C:\Program Files\nodejsnode_modules\npm\lib\utils\lifecycle.js:217:16)
npm verb stack at emitTwo (events.js:87:13)
npm verb stack at EventEmitter.emit (events.js:172:7)
npm verb stack at ChildProcess. (C:\Program Files\nodejsnode_modules\npm\lib\utils\spawn.js:24:14)
npm verb stack at emitTwo (events.js:87:13)
npm verb stack at ChildProcess.emit (events.js:172:7)
npm verb stack at maybeClose (internal/child_process.js:827:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
npm verb pkgid [email protected]
npm verb cwd C:\var\www-archibiz\api
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejsnode_modules\npm\bin\npm-cli.js" "install" "--verbose" "sharp"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the sharp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sharp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls sharp
npm ERR! There is likely additional logging output above.
npm verb exit [ 1, true ]
npm verb unbuild node_modules\sharp
npm info preuninstall [email protected]
npm info uninstall [email protected]
npm verb unbuild rmStuff [email protected] from C:\var\www-archibiz\apinode_modules
npm info postuninstall [email protected]
npm verb gentlyRm don't care about contents; nuking C:\var\www-archibiz\apinode_modules\sharp

npm ERR! Please include the following file with any support request:
npm ERR! C:\var\www-archibiz\api\npm-debug.log

Hello, the pertinent error here is:

MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
To fix this,
1) install the .NET Framework 2.0 SDK,
2) install Microsoft Visual Studio 2005 or
3) add the location of the component to the system path if it is installed elsewhere.

It's probably best for you to look through the solutions suggested in the related issues reported against node-gyp https://github.com/nodejs/node-gyp/search?q=MSB3428&type=Issues&utf8=%E2%9C%93

See also https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#environment-setup-and-configuration for updated info about no longer requiring a full MSVS install for node-gyp on Windows.

Good luck!

@lovell Or is there any way sharp can be build manually?

Ok. Now.. after upgrading node and npm with npm config set msvs_version 2013 --global which set msvc version to 2013, I have managed to make some progress.

Now I am getting following error...


Project "C:\var\www-archibiz\apinode_modules\sharp\build\binding.sln" (1) is b
uilding "C:\var\www-archibiz\apinode_modules\sharp\build\libvips-cpp.vcxproj"
(2) on node 1 (default targets).
C:\var\www-archibiz\apinode_modules\sharp\build\libvips-cpp.vcxproj(20,3): err
or MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found
. Confirm that the path in the declaration is correct, and that the fi
le exists on disk.
Done Building Project "C:\var\www-archibiz\apinode_modules\sharp\build\libvips
-cpp.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\var\www-archibiz\apinode_modules\sharp\build\binding
.sln" (default targets) -- FAILED.

Build FAILED.

"C:\var\www-archibiz\apinode_modules\sharp\build\binding.sln" (default target)
(1) ->
"C:\var\www-archibiz\apinode_modules\sharp\build\libvips-cpp.vcxproj" (default
target) (2) ->
C:\var\www-archibiz\apinode_modules\sharp\build\libvips-cpp.vcxproj(20,3): e
rror MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not fou
nd. Confirm that the path in the declaration is correct, and that the
file exists on disk.

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:00.06

420

@thatisuday I'm assuming you got everything working given the subsequent questions.

@lovell Yes. Sorry. Actually MS build independent package doesn't install all necessary packages. You must install Vistual Studio to get node-gyp working. It wasn't package bug but windows. Hate windows. Moving to mac soon.

Installing Standalone Build Tools solved this for me

http://landinghub.visualstudio.com/visual-cpp-build-tools

Was this page helpful?
0 / 5 - 0 ratings

Related issues

paulieo10 picture paulieo10  路  3Comments

terbooter picture terbooter  路  3Comments

tomercagan picture tomercagan  路  3Comments

vermin1337 picture vermin1337  路  3Comments

AVVS picture AVVS  路  3Comments