【发布时间】:2021-08-21 19:40:00
【问题描述】:
当我今天尝试使用 npm run serve 命令运行我的 Vue 应用程序时,我一直遇到问题。我已经用同一个存储库做了无数次了,但是当我刚刚启动它时它给出了这个错误。
This dependency was not found:
* node:console in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/News.vue?vue&type=script&lang=js&
To install it, you can run: npm install --save node:console
Error from chokidar (D:\): Error: EBUSY: resource busy or locked, lstat 'D:\pagefile.sys'
我尝试解决的问题:
- 使用
npm install更新所有包 - 删除了
node_modules文件夹并重新安装了整个依赖项 - 将 git 存储库重新加载到之前仍然可以工作的位置
- 使用命令
npm install --save node:console安装node:console,它会返回以下错误:
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "node:": node:console
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache\_logs\2021-06-03T16_45_28_752Z-debug.log
显然,没有一个修复有效。
【问题讨论】: