I created a new directory and did "npm install sharp".
Versions are:
{ npm: '3.10.10',
ares: '1.10.1-DEV',
http_parser: '2.7.0',
icu: '58.2',
modules: '48',
node: '6.11.2',
openssl: '1.0.2l',
uv: '1.11.0',
v8: '5.1.281.103',
zlib: '1.2.11' }
Log shows:
3668 warn enoent ENOENT: no such file or directory, open 'C:\Dev...\Lambda\ImageResizer\package.json'
3669 verbose enoent ENOENT: no such file or directory, open 'C:\Dev...\Lambda\ImageResizer\package.json'
3669 verbose enoent This is most likely not a problem with npm itself
3669 verbose enoent and is related to npm not being able to find a file.
3670 warn ImageResizer No description
3671 verbose If you need help, you may report this error at:
3671 verbose https://github.com/npm/npm/issues
3672 warn ImageResizer No repository field.
3673 verbose If you need help, you may report this error at:
3673 verbose https://github.com/npm/npm/issues
3674 warn ImageResizer No README data
3675 verbose If you need help, you may report this error at:
3675 verbose https://github.com/npm/npm/issues
3676 warn ImageResizer No license field.
3677 verbose If you need help, you may report this error at:
3677 verbose https://github.com/npm/npm/issues
3678 verbose stack Error: [email protected] install: node-gyp rebuild
3678 verbose stack Exit status 1
3678 verbose stack at EventEmitter.
3678 verbose stack at emitTwo (events.js:106:13)
3678 verbose stack at EventEmitter.emit (events.js:191:7)
3678 verbose stack at ChildProcess.
3678 verbose stack at emitTwo (events.js:106:13)
3678 verbose stack at ChildProcess.emit (events.js:191:7)
3678 verbose stack at maybeClose (internal/child_process.js:891:16)
3678 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
3679 verbose pkgid [email protected]
3680 verbose cwd C:\Dev...\Lambda\ImageResizer
3681 error Windows_NT 10.0.15063
3682 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "sharp"
3683 error node v6.11.2
3684 error npm v3.10.10
3685 error code ELIFECYCLE
3686 error [email protected] install: node-gyp rebuild
3686 error Exit status 1
3687 error Failed at the [email protected] install script 'node-gyp rebuild'.
3687 error Make sure you have the latest version of node.js and npm installed.
3687 error If you do, this is most likely a problem with the sharp package,
3687 error not with npm itself.
3687 error Tell the author that this fails on your system:
3687 error node-gyp rebuild
3687 error You can get information on how to open an issue for this project with:
3687 error npm bugs sharp
3687 error Or if that isn't available, you can get their info via:
3687 error npm owner ls sharp
3687 error There is likely additional logging output above.
3688 verbose exit [ 1, true ]
How to proceed?
Hello, are all the prerequisites available on this machine, including a C++11 compiler and the Python dependency of node-gyp?
I've been there...
on a admin cmd:
npm install -g --production windows-build-tools (this should install everything you need to build)
npm install -g node-gyp
and then finally
npm install sharp --save
hope it help you
I'll assume this was missing prerequisites but please reopen if this is still a problem.
Most helpful comment
I've been there...
on a admin cmd:
npm install -g --production windows-build-tools (this should install everything you need to build)
npm install -g node-gyp
and then finally
npm install sharp --save
hope it help you