npm run dev 启动项目后,出现编译警告 Compiled with 2 warnings

运行npm run dev 启动项目后,出现如下 Warning

[2019-06-05T17:13:16.265] [INFO] - WARNING Compiled with 2 warnings
              17:13:16
[2019-06-05T17:13:16.265] [INFO] -
[2019-06-05T17:13:16.268] [INFO] - warning in ./node_modules/es6-promise/dist/es6-promise.js
[2019-06-05T17:13:16.268] [INFO] -
[2019-06-05T17:13:16.269] [INFO] - There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
* E:\RAIS\rais-project\node_modules\es6-promise\dist\es6-promise.js
Used by 11 module(s), i. e.
E:\RAIS\rais-project\node_modules\babel-polyfill\node_modules\regenerator-runtime\runtime.js
* e:\RAIS\rais-project\node_modules\es6-promise\dist\es6-promise.js
Used by 1 module(s), i. e.
e:\RAIS\rais-project\node_modules\_@ckeditor_ckeditor5-build-classic@12.1.0@@ckeditor\ckeditor5-build-classic\build\ckeditor.js
[2019-06-05T17:13:16.269] [INFO] -
[2019-06-05T17:13:16.270] [INFO] - warning in ./node_modules/process/browser.js
[2019-06-05T17:13:16.270] [INFO] -
[2019-06-05T17:13:16.271] [INFO] - There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
* E:\RAIS\rais-project\node_modules\process\browser.js
Used by 13 module(s), i. e.
E:\RAIS\rais-project\node_modules\vue-localstorage\dist\vue-local-storage.js
* e:\RAIS\rais-project\node_modules\process\browser.js
Used by 1 module(s), i. e.
e:\RAIS\rais-project\node_modules\es6-promise\dist\es6-promise.js

问题原因:

windows下盘符的大小写导致的。

实际上,上面显示的警告,是指引用文件的时候大小写错了,有时候是盘符,有时候是引入文件的时候插件名

我打开VS Code 在cmd里运行的时候,自动定位到项目地址,盘符是大写,改成小写的e盘符就没问题了。

 

Be patient, and work hard!

转载于:https://www.cnblogs.com/JasmineLily/p/10981051.html

> chataiyy@1.0.0 dev > webpack-dev-server --inline --progress --config build/webpack.dev.conf.js (node:16004) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated. (Use `node --trace-deprecation ...` to show where the warning was created) 10% b 11 12% b 12% b 12% b 13% building modules 25/30 modules 5 active ...!D:\桌面\少儿编程\test2\chatbot\src\App.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }. 14% b 15% b 16 16 16 16 16 95% emitting WARNING Compiled with 2 warnings 00:53:50 This dependency was not found: * async_hooks in ./node_modules/body-parser/node_modules/raw-body/index.js, ./node_modules/on-finished/index.js To install it, you can run: npm install --save async_hooks 终止批处理操作吗(Y/N)? Y PS D:\桌面\少儿编程\test2\chatbot> node server/index.js node:internal/modules/cjs/loader:1078 throw err; ^ Error: Cannot find module 'D:\桌面\少儿编程\test2\chatbot\server\index.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15) at Module._load (node:internal/modules/cjs/loader:920:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47 { code: 'MODULE_NOT_FOUND', requireStack: [] } Node.js v18.15.0 PS D:\桌面\少儿编程\test2\chatbot> npm run dev > chataiyy@1.0.0 dev > webpack-dev-server --inline --progress --config build/webpack.dev.conf.js (node:13908) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated. (Use `node --trace-deprecation ...` to show where the warning was created) 10% b 11 12% b 12% b 12% b 12% building modules 24/27 modules 3 active ...!D:\桌面\少儿编程\test2\chatbot\src\App.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }. 14% b 14% b 16 95% emitting WARNING Compiled with 2 warnings 00:58:19 This dependency was not found: * async_hooks in ./node_modules/body-parser/node_modules/raw-body/index.js, ./node_modules/on-finished/index.js To install it, you can run: npm install --save async_hooks
07-16
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值