0

使用npm install(Npm 版本:6.14.15)它会安装所有内容,但是当我运行时yarn(Yarn 版本:1.22.17)并且我收到以下错误。这是为什么?

gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/node_libcurl/src/node_libcurl.o
clang: error: no such file or directory: '/usr/include'
make: *** [Release/obj.target/node_libcurl/src/node_libcurl.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit ((...)/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:365:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/Users/(...)/.nvm/versions/node/v16.2.0/bin/node" "(...)/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=(...)/node_modules/node-libcurl/lib/binding/node_libcurl.node" "--module_name=node_libcurl" "--module_path=(...)/node_modules/node-libcurl/lib/binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
gyp ERR! cwd (...)/node_modules/node-libcurl
gyp ERR! node -v v16.2.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/Users/(...)/.nvm/versions/node/v16.2.0/bin/node (...)/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=(...)/node_modules/node-libcurl/lib/binding/node_libcurl.node --module_name=node_libcurl --module_path=(...)/node_modules/node-libcurl/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> ((...)/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:365:28)
node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
node-pre-gyp ERR! System Darwin 18.7.0
node-pre-gyp ERR! command "/Users/(...)/.nvm/versions/node/v16.2.0/bin/node" "(...)/node_modules/node-libcurl/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd (...)/node_modules/node-libcurl
node-pre-gyp ERR! node -v v16.2.0
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok 
Failed to execute '/Users/(...)/.nvm/versions/node/v16.2.0/bin/node (...)/node_modules/no
4

0 回答 0