说明
每次我运行 npm run serve
出现以下错误代码:
ERROR Failed to compile with 1 error 15:34:19
This dependency was not found:
* ... in ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifie
r":"1a1491e2-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./no
de_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Ho
me.vue?vue&type=template&id=8dc7cce2&
To install it, you can run: npm install --save ...
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
Error from chokidar (C:\node_modules): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
Error from chokidar (C:\node_modules): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
Error from chokidar (C:\node_modules): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
在我的 ./components/file.vue 中添加引导轮播后,似乎出现了这个错误。虽然我不明白 carroussel 是如何与 npm chokidar 包相关联的。我试过的
此问题与 Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\DumpStack.log.tmp 重复,我尝试了建议的解决方案,但没有解决任何问题。我也试过
npm install --save
正如错误代码以及 npm cache clean --force
所建议的那样.我已经卸载了 npm chokidar 包,但没有解决问题,并删除了 C:\DumpStack.log.tmp
文件也。最后,我还安装了对 bug 没有影响的 bootstrap-vue npm 包。尽管我知道这可能是一个非常基本的错误,但以下都没有解决这个问题。包.json
{
"name": "vuejs-client",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"3": "^2.1.0",
"axios": "^0.21.1",
"bootstrap-vue": "^2.21.2",
"chokidar": "^3.5.1",
"core-js": "^3.6.5",
"vue": "^2.6.11",
"vue-router": "^3.5.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
我按照以下教程作为我想通过这个网站实现的引用框架:https://bezkoder.com/vue-node-express-mongodb-mevn-crud/
最佳答案
如上所述,该错误非常基本。我刚刚从 Bootstrap 复制粘贴了轮播模板,忘记替换占位符。
抱歉打扰了,这可能有助于强调这样一个事实,即在提出问题之前您确实必须将各个点联系起来,因为解决方案可能非常基本。
关于node.js - vuejs - 来自 chokidar 的错误(C :\): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66931929/