首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >执行npm安装导致fsevents错误

执行npm安装导致fsevents错误
EN

Stack Overflow用户
提问于 2020-05-13 16:29:22
回答 1查看 1.3K关注 0票数 0

我已经使用serverless创建了一个新的typescript项目。当我尝试安装这些包时,我收到一个fsevents错误。以下是从创建项目到安装软件包的完整脚本

操作系统: mac npm: 6.14.4节点: 12.16.3

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

发布于 2020-08-28 18:46:50

遇到类似的问题,并在将以下代码添加到package.json后,重新运行npm install/ yarn install

代码语言:javascript
复制
"resolutions": {
        "**/**/node-gyp": "5.0.0"
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61769787

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档