NPM 安装不适用于 Node V 16.0.0

时间:2021-05-02 22:04:34

标签: node.js npm npm-install

我无法找到解决方案。我正在为一个项目尝试 npm install,但出现了一个非常大的错误。我在下面粘贴了其中的一小部分。任何帮助解决此问题的人都将不胜感激。

npm ERR!   V8_DEPRECATED("Use GetBackingStore. See http://crbug.com/v8/9908.")
npm ERR!   ^
npm ERR! /Users/kali/.node-gyp/16.0.0/include/node/v8config.h:415:35: note: expanded from macro 'V8_DEPRECATED'
npm ERR! # define V8_DEPRECATED(message) [[deprecated(message)]]
npm ERR!                                   ^
npm ERR! 1 warning and 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/kali/web_projects/webproj1/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:365:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 20.3.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Users/kali/web_projects/webproj1/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Users/kali/web_projects/webproj1/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.0.0
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:

这是我的 package.json

{
  "name": "code",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "watch": "node-sass --watch css/style.scss css/style.css",
    "build": "nodemon --exec babel-node ./js/* ",
    "start": "concurrently \"npm run watch\" \"npm run build\""
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "concurrently": "^5.0.0",
    "gsap": "^3.0.1",
    "node-sass": "^4.13.0"
  },
  "devDependencies": {
    "@babel/cli": "^7.7.4",
    "@babel/core": "^7.7.4",
    "@babel/node": "^7.7.4",
    "@babel/preset-env": "^7.7.4",
    "nodemon": "^2.0.1"
  }
}

我正在运行 Node 版本 16.0.0 和 NPM 版本 7.10.0。我在 macOS Big Sur 上

0 个答案:

没有答案