Sharp: can not install sharp

Created on 3 Jan 2017  ·  3Comments  ·  Source: lovell/sharp

win10

E:\work\other\electro\electron-demo>npm install sharp

[email protected] install E:\work\other\electro\electron-demo\node_modulessharp
node-gyp rebuild

E:\work\other\electro\electron-demo\node_modulessharp>if not defined npm_config_node_gyp (node "D:\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property page
s or by right-clicking the solution and selecting "Retarget solution". [E:\work\other\electro\electron-demo\node_modulessharp\build\libvips-cpp.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (D:\nodejs\node_modules\npm\node_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 10.0.14931
gyp ERR! command "D:\nodejs\node.exe" "D:\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd E:\work\other\electro\electron-demo\node_modulessharp
gyp ERR! node -v v4.4.5
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Windows_NT 10.0.14931
npm ERR! argv "D:\nodejs\node.exe" "D:\nodejs\node_modules\npm\bin\npm-cli.js" "install" "sharp"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
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 ERR! Please include the following file with any support request:
npm ERR! E:\work\other\electro\electron-demo\npm-debug.log

question

Most helpful comment

Sounds like an issue with windows trying to build the native sources with node-gyp.

Have you installed windows-build-tools or the windows required sdk packages?

All 3 comments

Sounds like an issue with windows trying to build the native sources with node-gyp.

Have you installed windows-build-tools or the windows required sdk packages?

@makepanic I mess up npm & cnpm, but I install sharp successfully now.

@henbenla @makepanic just got the same issue. What do you mean about npm & cnpm?
Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

natural-law picture natural-law  ·  3Comments

OleVik picture OleVik  ·  3Comments

zilions picture zilions  ·  3Comments

kachurovskiy picture kachurovskiy  ·  3Comments

zhump picture zhump  ·  3Comments