ERROR command failed: npm install --loglevel error --legacy-peer-deps
一、问题场景
MacBook Air 创建 vue 项目时报错:ERROR command failed: npm install --loglevel error --legacy-peer-deps
二、原因分析
node 版本问题
验证 node
which node
/usr/local/bin/node
node -v
v16.4.1
三、解决方案
1、pkg 卸载 node
sudo rm -rf /usr/local/{bin/{node,npm},lib/node_modules/npm,lib/node,share/man/*/node.*}
2、node.js官网 下载长期支持版
3、查看 node 版本
node -v
v14.17.4
4、创建项目正常
四、报错具体内容如下
(报错内容很长,但还是都复制下来了,嘻嘻😁)
added 1236 packages in 24s
🚀 Invoking generators…
📦 Installing additional dependencies…
npm ERR! code 1
npm ERR! path /Users/raylin/Desktop/workspace/mei/vueapp/test_b/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/ast.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/ast_fwd_decl.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/backtrace.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/base64vlq.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/bind.o
npm ERR! CC(target) Release/obj.target/libsass/src/libsass/src/cencode.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/check_nesting.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/color_maps.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/constants.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/context.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/cssize.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/emitter.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/environment.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/error_handling.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/eval.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/expand.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/extend.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/file.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/functions.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/inspect.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/json.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/lexer.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/listize.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/memory/SharedPtr.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/node.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/operators.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/output.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/parser.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/plugins.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/position.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/prelexer.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/remove_placeholders.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/sass.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/sass2scss.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/sass_context.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/sass_functions.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/sass_util.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/sass_values.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/source_map.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/subset_map.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/to_c.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/to_value.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/units.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/utf8_string.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/util.o
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/values.o
npm ERR! LIBTOOL-STATIC Release/sass.a
npm ERR! CXX(target) Release/obj.target/binding/src/binding.o
npm ERR! (node:48564) [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! 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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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::__1::basic_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:56:
npm ERR! In file included from /Users/raylin/.node-gyp/16.4.1/include/node/node.h:63:
npm ERR! In file included from /Users/raylin/.node-gyp/16.4.1/include/node/v8.h:30:
npm ERR! /Users/raylin/.node-gyp/16.4.1/include/node/v8-internal.h:454: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>::value>::Perform(data);
npm ERR! ~~~~~~~^
npm ERR! remove_cv
npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:776:50: note: ‘remove_cv’ declared here
npm ERR! template 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/raylin/Desktop/workspace/mei/vueapp/test_b/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.4.0
npm ERR! gyp ERR! command “/usr/local/bin/node” “/Users/raylin/Desktop/workspace/mei/vueapp/test_b/node_modules/.bin/node-gyp” “rebuild”
npm ERR! gyp ERR! cwd /Users/raylin/Desktop/workspace/mei/vueapp/test_b/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.4.1
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/raylin/.npm/_logs/2021-07-31T03_38_12_078Z-debug.log
ERROR command failed: npm install --loglevel error --legacy-peer-deps
更多推荐
所有评论(0)