我正尝试阅读有关无服务器项目的教程,但遇到了无法继续的问题。我已经安装了“无服务器”软件包,并使用它来使用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
谢谢!
答案 0 :(得分:1)
要回答我自己的问题,我找到的解决方案是指定fsevents库的更新版本。将"fsevents": "^1.2.4",
添加到package.json的devDependencies部分后,该项目即可构建。