Cannot install sharp node 16
See original GitHub issuenpm ERR! code 1
npm ERR! path /Users/steve/Sites/brighter-futures/node_modules/favicons/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
npm ERR! TOUCH Release/obj.target/libvips-cpp.stamp
npm ERR! CXX(target) Release/obj.target/sharp/src/common.o
npm ERR! info sharp Using cached /Users/steve/.npm/_libvips/libvips-8.8.1-darwin-x64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.9.0 | darwin | x64
npm ERR! (node:15043) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python2
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/steve/Sites/brighter-futures/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/steve/Sites/brighter-futures/node_modules/favicons/node_modules/sharp/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/steve/Sites/brighter-futures/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/steve/.node-gyp/16.9.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/steve/.node-gyp/16.9.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/steve/Sites/brighter-futures/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/steve/.node-gyp/16.9.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/steve/Sites/brighter-futures/node_modules/favicons/node_modules/sharp',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/common.cc:22:
npm ERR! In file included from /Users/steve/.node-gyp/16.9.0/include/node/node.h:63:
npm ERR! In file included from /Users/steve/.node-gyp/16.9.0/include/node/v8.h:30:
npm ERR! /Users/steve/.node-gyp/16.9.0/include/node/v8-internal.h:489:38: error: no template named 'remove_cv_t' in namespace 'std'; did you mean 'remove_cv'?
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ~~~~~^~~~~~~~~~~
npm ERR! remove_cv
npm ERR! /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:776:50: note: 'remove_cv' declared here
npm ERR! template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
npm ERR! ^
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/sharp/src/common.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/Users/steve/Sites/brighter-futures/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 20.6.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/16.9.0/bin/node" "/Users/steve/Sites/brighter-futures/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/steve/Sites/brighter-futures/node_modules/favicons/node_modules/sharp
npm ERR! gyp ERR! node -v v16.9.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/steve/.npm/_logs/2021-09-14T13_06_11_323Z-debug.log****
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Can't install Sharp - node.js - Stack Overflow
I have solved this error by downgrading node version to 10.0.0 . It really works!
Read more >Installation - High performance Node.js image processing
To install the prebuilt sharp binaries from a directory on the local filesystem, set the sharp_local_prebuilds npm config option or the npm_config_sharp_local_ ...
Read more >sharp - npm
High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images. Latest version: 0.31.3, ...
Read more >Repeated deploy failures because of sharp; node version ...
The node module 'sharp' seems to be a problem. ... PM: sharp: Installation error: Expected Node.js version >=12.13.0 but found 10.24.1.
Read more >Npm install command failing with message "could not find ...
When I run the npm install command, npm starts downloading the ... \npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16 npm ERR! gyp ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Seems to be pulling in all sorts here. Probably not an issue with this package my bad.
This suggests you’ll need to upgrade the
favicons
package.