npm install 在我的 mac 上的无服务器项目上失败,原因是什么?
npm install fails on serverless project on my mac, what is the cause?
我正在尝试完成有关无服务器项目的教程,但遇到了无法继续的问题。我已经安装了 'serverless' 包并使用它来设置初始项目结构 serverless install --url https://github.com/AnomalyInnovations/serverless-nodejs-starter --name notes-app-api
这似乎成功了,下一步是 运行 'npm install' 但是这失败了,并显示以下消息。欢迎就如何诊断原因提出任何建议。
npm install
> fsevents@1.1.3 install /Development/serverless/myproject/myproject-api/node_modules/fsevents
> node install
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.1.3 and node@10.5.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.1.3 and node@10.5.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
谢谢!
为了回答我自己的问题,我找到的解决方案是指定更新版本的 fsevents 库。将 "fsevents": "^1.2.4",
添加到 package.json 中的 devDependencies 部分后,项目就可以构建了。
我正在尝试完成有关无服务器项目的教程,但遇到了无法继续的问题。我已经安装了 'serverless' 包并使用它来设置初始项目结构 serverless install --url https://github.com/AnomalyInnovations/serverless-nodejs-starter --name notes-app-api
这似乎成功了,下一步是 运行 'npm install' 但是这失败了,并显示以下消息。欢迎就如何诊断原因提出任何建议。
npm install
> fsevents@1.1.3 install /Development/serverless/myproject/myproject-api/node_modules/fsevents
> node install
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.1.3 and node@10.5.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.1.3 and node@10.5.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
谢谢!
为了回答我自己的问题,我找到的解决方案是指定更新版本的 fsevents 库。将 "fsevents": "^1.2.4",
添加到 package.json 中的 devDependencies 部分后,项目就可以构建了。