1

node version: v16.2.0
npm version: 6.14.15

When running npm i --unsafe-perm node-sass I get the following error:

(...)/.node-gyp/16.2.0/include/node/v8-internal.h:452:38: error: no template named 'remove_cv_t' in namespace 'std'; did you mean
      'remove_cv'?
            !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
                                ~~~~~^~~~~~~~~~~
                                     remove_cv
/Library/Developer/CommandLineTools/usr/include/c++/v1/type_traits:660:50: note: 'remove_cv' declared here
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
                                                 ^
1 error generated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
(...)
gyp ERR! command "(...)/.nvm/versions/node/v16.2.0/bin/node" "(...)/(...)/client/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd (...)/(...)/client/node_modules/node-sass
gyp ERR! node -v v16.2.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-sass@4.14.1 postinstall 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!     (...)/.npm/_logs/2021-11-19T14_20_07_680Z-debug.log

How do I solve this? There is no package-lock file.

Wim den Herder
  • 1,197
  • 9
  • 13
  • 1
    node-gyp is a terrible pain-in-the-ass, it was constantly breaking our builds on Windows, the best solution is to find out what package is using (directly or indirectly) node-gyp and getting rid of it / finding replacement – 9ilsdx 9rvj 0lo Nov 19 '21 at 14:36
  • Great thanks, that link solved it for me (updating node-sass to version 6) – Wim den Herder Nov 19 '21 at 17:12

0 Answers0