如何解决依赖性问题:“ npm run dev”不起作用

时间:2020-10-05 07:48:07

标签: javascript node.js vue.js npm webpack

我有一个基于Vue的应用程序,我试图通过使用命令npm run dev运行该应用程序,但它给了我以下错误:

未找到此依赖项:

These dependencies were not found:

* module in (webpack)/lib/node/NodeTargetPlugin.js
* webpack/lib/web/FetchCompileWasmTemplatePlugin in ./node_modules/worker-loader/dist/index.js        

To install them, you can run: npm install --save module webpack/lib/web/FetchCompileWasmTemplatePlugin
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\pagefile.sys'
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\swapfile.sys'

下面是我的package.json

{
  "name": "app",
  "version": "1.0.0",
  "description": "ATS System",
  "author": "N4TECH",
  "private": true,
  "scripts": {
    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
    "start": "node server.js",
    "build:dev": "node build/dev.js",
    "build:prod": "node build/build.js"
  },
  "dependencies": {
    "axios": "^0.17.1",
    "bootstrap": "^3.3.7",
    "bootstrap-vue": "^1.4.0",
    "chalk": "^2.0.1",
    "chokidar": "^3.4.2",
    "css-loader": "^0.28.8",
    "debounce": "^1.1.0",
    "express": "^4.16.3",
    "express-static-gzip": "^0.3.2",
    "jquery": "^3.3.1",
    "lodash": "^4.17.5",
    "moment": "^2.20.1",
    "node-sass": "^4.7.2",
    "pusher-js": "^4.3.1",
    "raw-loader": "^0.5.1",
    "sass-loader": "^6.0.6",
    "tributejs": "^3.5.3",
    "vee-validate": "^2.0.0-beta.17",
    "vue": "^2.5.2",
    "vue-html5-editor": "^1.1.1",
    "vue-i18n": "^8.1.0",
    "vue-pdf": "^3.2.0",
    "vue-router": "^3.0.1",
    "vue-scrollto": "^2.11.0",
    "vue-social-sharing": "^2.3.3",
    "vue-style-loader": "^3.0.3",
    "vue-truncate-collapsed": "^1.3.0",
    "vue2-datatable-component": "^2.1.26",
    "vuedraggable": "^2.16.0",
    "vuetify": "^1.2.4",
    "vuex": "^3.0.1",
    "vuex-persistedstate": "^2.4.2"
  },
  "devDependencies": {
    "autoprefixer": "^7.1.2",
    "babel-core": "^6.22.1",
    "babel-helper-vue-jsx-merge-props": "^2.0.3",
    "babel-loader": "^7.1.1",
    "babel-plugin-syntax-jsx": "^6.18.0",
    "babel-plugin-transform-runtime": "^6.22.0",
    "babel-plugin-transform-vue-jsx": "^3.5.0",
    "babel-preset-env": "^1.3.2",
    "babel-preset-stage-2": "^6.22.0",
    "chalk": "^2.0.1",
    "compression-webpack-plugin": "^1.1.6",
    "copy-webpack-plugin": "^4.0.1",
    "css-loader": "^0.28.0",
    "extract-text-webpack-plugin": "^3.0.0",
    "file-loader": "^1.1.4",
    "friendly-errors-webpack-plugin": "^1.6.1",
    "html-webpack-plugin": "^2.30.1",
    "node-notifier": "^5.1.2",
    "optimize-css-assets-webpack-plugin": "^3.2.0",
    "ora": "^1.2.0",
    "portfinder": "^1.0.13",
    "postcss-import": "^11.0.0",
    "postcss-loader": "^2.0.8",
    "postcss-url": "^7.2.1",
    "rimraf": "^2.6.0",
    "semver": "^5.3.0",
    "shelljs": "^0.7.6",
    "uglifyjs-webpack-plugin": "^1.1.1",
    "url-loader": "^0.5.8",
    "vue-loader": "^13.3.0",
    "vue-style-loader": "^3.0.1",
    "vue-template-compiler": "^2.5.2",
    "webpack": "^3.12.0",
    "webpack-bundle-analyzer": "^2.9.0",
    "webpack-dev-server": "^2.9.1",
    "webpack-merge": "^4.1.0",
    "worker-loader": "^3.0.3"
  },
  "engines": {
    "node": ">= 6.0.0",
    "npm": ">= 3.0.0"
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not ie <= 8"
  ]
}

我还尝试了删除node_modules文件夹,运行干净的高速缓存,即npm cache clean --force,,然后重新安装,但是没有运气。我被困在这个问题上。任何帮助都会非常明显。

0 个答案:

没有答案