npm 安装错误。节点js?七大事件? Xcode?还是其他问题?

npm install error. node js? fsevents? Xcode? Or another problem?

下午好。朋友们!请帮助。有一个错误。我 运行 npm install 命令,这个问题崩溃了:

natalakolivosko@192 webpack-static-template % npm install

> fsevents@1.2.13 install /Users/natalakolivosko/Documents/JM/wc_CPS_block16/webpack-static-template/node_modules/watchpack-chokidar2/node_modules/fsevents
> node install.js

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/natalakolivosko/Documents/JM/wc_CPS_block16/webpack-static-template/node_modules/watchpack-chokidar2/node_modules/fsevents
gyp ERR! node -v v12.18.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 

> fsevents@1.2.13 install /Users/natalakolivosko/Documents/JM/wc_CPS_block16/webpack-static-template/node_modules/webpack-dev-server/node_modules/fsevents
> node install.js

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/natalakolivosko/Documents/JM/wc_CPS_block16/webpack-static-template/node_modules/webpack-dev-server/node_modules/fsevents
gyp ERR! node -v v12.18.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 

> node-sass@4.14.1 install /Users/natalakolivosko/Documents/JM/wc_CPS_block16/webpack-static-template/node_modules/node-sass
> node scripts/install.js

Cached binary found at /Users/natalakolivosko/.npm/node-sass/4.14.1/darwin-x64-72_binding.node

> node-sass@4.14.1 postinstall /Users/natalakolivosko/Documents/JM/wc_CPS_block16/webpack-static-template/node_modules/node-sass
> node scripts/build.js

Binary found at /Users/natalakolivosko/Documents/JM/wc_CPS_block16/webpack-static-template/node_modules/node-sass/vendor/darwin-x64-72/binding.node
Testing binary
Binary is fine
npm WARN webpack-test@1.0.0 No repository field.

added 959 packages from 489 contributors and audited 959 packages in 27.986s

28 packages are looking for funding
  run `npm fund` for details

found 215 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

我尝试卸载并再次安装 node jslink。我还尝试通过 npm install fsevents.

再次安装 fsevents

不幸的是,这并没有产生任何结果。

请告诉我问题是什么以及如何解决?

如有其他问题,请告诉我,我会一一解答。

p.s。我有 macOS。

再见,根据 this 文章,您必须通过删除以前安装的版本来重新安装命令行工具。简而言之:

  1. 查找命令行工具的安装位置:

     xcode-select --print-path
    
  2. 删除:

    sudo rm -r -f /path/found/onprevious/step
    
  3. 重新安装:

    xcode-select --install
    

注意:文章指的是 macOS Catalina。