[英]executing npm install causes fsevents error
I have created a new typescript project using serverless.我使用无服务器创建了一个新的 typescript 项目。 When I try to install the packages I receive an fsevents error.
当我尝试安装软件包时,我收到 fsevents 错误。 Below is the full script from the creating of the project to installing the packages
下面是从创建项目到安装包的完整脚本
OS: mac npm: 6.14.4 node: 12.16.3操作系统:mac npm:6.14.4 节点:12.16.3
stmf@ml0195091 services % sls create -t aws-nodejs-typescript
Serverless: Generating boilerplate...
_______ __
| _ .-----.----.--.--.-----.----| .-----.-----.-----.
| |___| -__| _| | | -__| _| | -__|__ --|__ --|
|____ |_____|__| \___/|_____|__| |__|_____|_____|_____|
| | | The Serverless Application Framework
| | serverless.com, v1.70.1
-------'
Serverless: Successfully generated boilerplate for template: "aws-nodejs-typescript"
Serverless: NOTE: Please update the "service" property in serverless.yml with your service name
stmf@ml0195091 services % npm install
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
> fsevents@1.2.13 install /Users/stmf/Documents/development/esg/esg-data-api/services/node_modules/watchpack/node_modules/fsevents
> node install.js
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27)
gyp ERR! System Darwin 19.4.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/stmf/Documents/development/esg/esg-data-api/services/node_modules/watchpack/node_modules/fsevents
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN services@1.0.0 No repository field.
added 420 packages from 305 contributors in 22.939s
faced similar issue, and after adding below code to package.json re-run npm install/ yarn install遇到类似问题,在将以下代码添加到 package.json 后重新运行 npm 安装/纱线安装
"resolutions": {
"**/**/node-gyp": "5.0.0"
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.