Sharp: Build fails Windows 10

Created on 13 Dec 2018  路  2Comments  路  Source: lovell/sharp

I have followed the instructions on the Gatsby and Windows page here with the VS Studio 2017 configuration.

I have tried deleting the file found here: C:\Users\\AppData\Roaming\npm-cache\_libvips
I have also tried deleting the sharp.vcxproj file.

C:\Users\johnf.node-gyp\11.3.0x64\node.lib : fatal error LNK1127: library is corrupt [C:\Users\johnf\Projects\Traversy2\gatsby_crash_course\node_modules\sharpbuild\sharp.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\libbuild.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254: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" "rebuild"
gyp ERR! cwd C:\Users\johnf\Projects\Traversy2\gatsby_crash_course\node_modules\sharp
gyp ERR! node -v v11.3.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
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:
npm ERR! C:\Users\johnf\AppData\Roaming\npm-cache_logs\2018-12-13T14_27_46_127Z-debug.log

question

Most helpful comment

Node 11 installed. I had to uninstall and reinstall everything then I got it to install.

All 2 comments

Hello, if you're able to use Node 10 then you'll get pre-compiled binaries that don't require MSVC.

Node 11 installed. I had to uninstall and reinstall everything then I got it to install.

Was this page helpful?
0 / 5 - 0 ratings