ERR! errno 1 npm ERR! koa2-es10@1.0.0 start: `nodemon --exec npm run babel`的解决方法

本文介绍了在安装es10-cli后,启动koa2-es10项目遇到npm ERR! code ELIFECYCLE, errno 1的问题。错误的根本原因是项目中的node_modules文件夹丢失。解决方法是重新安装node_modules。" 116342449,10541798,Oracle日期操作详解:格式化、加减乘与毫秒精度,"['Oracle数据库', '日期操作', '时间处理', 'SQL']

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! koa2-es10@1.0.0 start: nodemon --exec npm run babel npm ERR! errno 1 npm ERR! koa2-es10@1.0.0 start: nodemon --exec npm run babel的解决方法

安装es10-cli 脚手架后,启动项目时遇到时发生的node_modules丢失问题

Harry@Sheep MINGW64 /d/Study/Microsoft VS Code Workspace/ES6-10/es2019
$ npm start

> koa2-es10@1.0.0 start D:\Study\Microsoft VS Code Workspace\ES6-10\es2019
> nodemon --exec npm run babel

'nodemon' ▒▒▒▒▒ڲ▒▒▒▒ⲿ▒▒▒Ҳ▒▒▒ǿ▒▒▒▒еij▒▒▒
▒▒▒▒▒▒▒▒▒ļ▒▒▒
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! koa2-es10@1.0.0 start: `nodemon --exec npm run babel`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the koa2-es10@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\Study\NodeJs\node_cache\_logs\2020-06-20T11_34_02_410Z-debug.log

错误原因在于文件 node_modules 在项目中丢失

解决方法

#1.在命令行中先进入文件所在路径

#2.然后输入命令 npm i

Harry@Sheep MINGW64 /d/Study/Microsoft VS Code Workspace/ES6-10/es2019
$ npm i

> nodemon@1.19.0 postinstall D:\Study\Microsoft VS Code Workspace\ES6-10\es2019\node_m         odules\nodemon
> node bin/postinstall || exit 0


> webpack-cli@3.3.2 postinstall D:\Study\Microsoft VS Code Workspace\ES6-10\es2019\nod         e_modules\webpack-cli
> node ./bin/opencollective.js



                            Thanks for using Webpack!
                 Please consider donating to our Open Collective
                        to help us maintain this package.



                 Donate: https://opencollective.com/webpack/donate


npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents)         :
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9:          wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 772 packages from 361 contributors in 75.286s

Harry@Sheep MINGW64 /d/Study/Microsoft VS Code Workspace/ES6-10/es2019
$ npm start

> koa2-es10@1.0.0 start D:\Study\Microsoft VS Code Workspace\ES6-10\es2019
> nodemon --exec npm run babel

[nodemon] 1.19.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `npm run babel`

> koa2-es10@1.0.0 babel D:\Study\Microsoft VS Code Workspace\ES6-10\es2019
> babel-node app.js

Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Sat, 20 Jun 2020 11:37:26 GMT koa deprecated Support for generators will be removed in          v3. See the documentation for examples of how to convert old middleware https://githu         b.com/koajs/koa/blob/master/docs/migration.md at app.js:39:5
server is listen, http://localhost:8080
(node:7136) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks`          instead
webpack built 7895160d0283794de298 in 337ms

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值