Mac(m1)下npm install报错解决方案

报错内容1:

npm ERR! code 1

npm ERR! path /Users/.../node_modules/chromedriver

npm ERR! command failed

npm ERR! command sh -c node install.js

npm ERR! Only Mac 64 bits supported.

npm ERR! A complete log of this run can be found in:

npm ERR!     /Users/.../.npm/_logs/2021-12-31T09_11_02_875Z-debug.log

 

解决方法:

npm install --ignore-scripts
npm uninstall node-saas      //卸载node -saas
npm install node-sass --save-dev      //重新安装node -saas

 

报错内容2:

npm ERR! gyp info it worked if it ends with ok

npm ERR! gyp verb cli [

npm ERR! gyp verb cli   '/usr/local/bin/node',

npm ERR! gyp verb cli   '/Users/zyq/Documents/music-website-master/music-client/node_modules/node-gyp/bin/node-gyp.js',

npm ERR! gyp verb cli   'rebuild',

npm ERR! gyp verb cli   '--verbose',

npm ERR! gyp verb cli   '--libsass_ext=',

npm ERR! gyp verb cli   '--libsass_cflags=',

npm ERR! gyp verb cli   '--libsass_ldflags=',

npm ERR! gyp verb cli   '--libsass_library='

npm ERR! gyp verb cli ]

npm ERR! gyp info using node-gyp@3.8.0

npm ERR! gyp info using node@16.13.1 | darwin | arm64

npm ERR! gyp verb command rebuild []

npm ERR! gyp verb command clean []

npm ERR! gyp verb clean removing "build" directory

npm ERR! gyp verb command configure []

npm ERR! gyp verb check python checking for Python executable "python2" in the PATH

npm ERR! gyp verb `which` succeeded python2 /usr/bin/python2

npm ERR! gyp verb check python version `/usr/bin/python2 -c "import sys; print "2.7.18

npm ERR! gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j

npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 16.13.1

npm ERR! gyp verb command install [ '16.13.1' ]

npm ERR! gyp verb install input version string "16.13.1"

npm ERR! gyp verb install installing version: 16.13.1

npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed

npm ERR! gyp verb install version is already installed, need to check "installVersion"

npm ERR! gyp verb got "installVersion" 9

npm ERR! gyp verb needs "installVersion" 9

npm ERR! gyp verb install version is good

npm ERR! gyp verb get node dir target node version installed: 16.13.1

npm ERR! gyp verb build dir attempting to create "build" dir: /Users/zyq/Documents/music-website-master/music-client/node_modules/node-sass/build

npm ERR! gyp verb build dir "build" dir needed to be created? /Users/zyq/Documents/music-website-master/music-client/node_modules/node-sass/build

npm ERR! gyp verb build/config.gypi creating config file

npm ERR! gyp verb build/config.gypi writing out config file: /Users/zyq/Documents/music-website-master/music-client/node_modules/node-sass/build/config.gypi

npm ERR! (node:28573) [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 verb config.gypi checking for gypi file: /Users/zyq/Documents/music-website-master/music-client/node_modules/node-sass/config.gypi

npm ERR! gyp verb common.gypi checking for gypi file: /Users/zyq/Documents/music-website-master/music-client/node_modules/node-sass/common.gypi

npm ERR! gyp verb gyp gyp format was not specified; forcing "make"

npm ERR! gyp info spawn /usr/bin/python2

npm ERR! gyp info spawn args [

npm ERR! gyp info spawn args   '/Users/zyq/Documents/music-website-master/music-client/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/zyq/Documents/music-website-master/music-client/node_modules/node-sass/build/config.gypi',

npm ERR! gyp info spawn args   '-I',

npm ERR! gyp info spawn args   '/Users/zyq/Documents/music-website-master/music-client/node_modules/node-gyp/addon.gypi',

npm ERR! gyp info spawn args   '-I',

npm ERR! gyp info spawn args   '/Users/zyq/.node-gyp/16.13.1/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/zyq/.node-gyp/16.13.1',

npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/zyq/Documents/music-website-master/music-client/node_modules/node-gyp',

npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/zyq/.node-gyp/16.13.1/<(target_arch)/node.lib',

npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/zyq/Documents/music-website-master/music-client/node_modules/node-sass',

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 verb command build []

npm ERR! gyp verb build type Release

npm ERR! gyp verb architecture arm64

npm ERR! gyp verb node dev dir /Users/zyq/.node-gyp/16.13.1

npm ERR! gyp verb `which` succeeded for `make` /usr/bin/make

npm ERR! gyp info spawn make

npm ERR! gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]

npm ERR! In file included from ../src/libsass/src/ast.cpp:2:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/ast_fwd_decl.cpp:1:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/bind.cpp:3:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/check_nesting.cpp:4:

npm ERR! In file included from ../src/libsass/src/check_nesting.hpp:4:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/color_maps.cpp:2:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/context.cpp:9:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/cssize.cpp:6:

npm ERR! In file included from ../src/libsass/src/cssize.hpp:4:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/environment.cpp:2:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/error_handling.cpp:2:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/eval.cpp:10:

npm ERR! In file included from ../src/libsass/src/eval.hpp:4:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/expand.cpp:5:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/extend.cpp:2:

npm ERR! In file included from ../src/libsass/src/extend.hpp:7:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/file.cpp:23:

npm ERR! In file included from ../src/libsass/src/sass_functions.hpp:6:

npm ERR! In file included from ../src/libsass/src/functions.hpp:4:

npm ERR! In file included from ../src/libsass/src/listize.hpp:7:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/functions.cpp:2:

npm ERR! In file included from ../src/libsass/src/functions.hpp:4:

npm ERR! In file included from ../src/libsass/src/listize.hpp:7:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/inspect.cpp:9:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/listize.cpp:6:

npm ERR! In file included from ../src/libsass/src/listize.hpp:7:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/node.cpp:4:

npm ERR! In file included from ../src/libsass/src/node.hpp:7:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/operators.cpp:2:

npm ERR! In file included from ../src/libsass/src/operators.hpp:4:

npm ERR! In file included from ../src/libsass/src/values.hpp:4:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/output.cpp:2:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/parser.cpp:2:

npm ERR! In file included from ../src/libsass/src/parser.hpp:7:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/remove_placeholders.cpp:2:

npm ERR! In file included from ../src/libsass/src/remove_placeholders.hpp:6:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/sass.cpp:11:

npm ERR! In file included from ../src/libsass/src/sass_functions.hpp:6:

npm ERR! In file included from ../src/libsass/src/functions.hpp:4:

npm ERR! In file included from ../src/libsass/src/listize.hpp:7:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/sass_context.cpp:9:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/sass_functions.cpp:5:

npm ERR! In file included from ../src/libsass/src/values.hpp:4:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/sass_util.cpp:2:

npm ERR! In file included from ../src/libsass/src/node.hpp:7:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/sass_values.cpp:5:

npm ERR! In file included from ../src/libsass/src/eval.hpp:4:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/source_map.cpp:7:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/subset_map.cpp:2:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/to_c.cpp:3:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/to_value.cpp:2:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/util.cpp:3:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/libsass/src/values.cpp:3:

npm ERR! In file included from ../src/libsass/src/values.hpp:4:

npm ERR! ../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto numerator : numerators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto numerator : numerators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! ../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]

npm ERR!         for (const auto denominator : denominators)

npm ERR!                         ^

npm ERR! ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying

npm ERR!         for (const auto denominator : denominators)

npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~

npm ERR!                         &

npm ERR! 2 warnings generated.

npm ERR! In file included from ../src/binding.cpp:1:

npm ERR! In file included from ../../nan/nan.h:58:

npm ERR! In file included from /Users/zyq/.node-gyp/16.13.1/include/node/node.h:63:

npm ERR! In file included from /Users/zyq/.node-gyp/16.13.1/include/node/v8.h:30:

npm ERR! /Users/zyq/.node-gyp/16.13.1/include/node/v8-internal.h:492: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:710: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/binding/src/binding.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/zyq/Documents/music-website-master/music-client/node_modules/node-gyp/lib/build.js:262:23)

npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)

npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)

npm ERR! gyp ERR! System Darwin 21.1.0

npm ERR! gyp ERR! command "/usr/local/bin/node" "/Users/zyq/Documents/music-website-master/music-client/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="

npm ERR! gyp ERR! cwd /Users/zyq/Documents/music-website-master/music-client/node_modules/node-sass

npm ERR! gyp ERR! node -v v16.13.1

npm ERR! gyp ERR! node-gyp -v v3.8.0

npm ERR! gyp ERR! not ok 

npm ERR! Build failed with error code: 1

npm ERR! A complete log of this run can be found in:

npm ERR!     /Users/.../.npm/_logs/2021-12-31T12_13_43_252Z-debug.log

 

原因是node sass不支持当前的环境:arm。

解决方法:

用sass 代替node sass
删除掉package.jeson中"dependencies": {"node-sass": "^4.14.0"}

然后执行

npm uninstall node sass
npm install sass
npm install

 

 

posted @   バカなの  阅读(6621)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
点击右上角即可分享
微信分享提示