Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
404 views
in Technique[技术] by (71.8m points)

node.js - Cannot find module 'webpack/lib/web/FetchCompileWasmTemplatePlugin'

I have a Vue application which is running live and node version is 8. I have clone this application, I deleted the package.lock file and node_module folder, and run npm i, I have node 12.18 installed on my mechine, after successful installation, I try to run appplication by npm run dev, but getting error:

ERROR  Failed to compile with 1 errors                                                                                                                   11:14:59 AM

 error  in ./node_modules/pdfjs-dist/build/pdf.worker.js

Module build failed: Error: Cannot find module 'webpack/lib/web/FetchCompileWasmTemplatePlugin'
Require stack:
- C:xampphtdocseasy-portal
ode_modulesworker-loaderdistindex.js
- C:xampphtdocseasy-portal
ode_modulesworker-loaderdistcjs.js
- C:xampphtdocseasy-portal
ode_modulesloader-runnerlibloadLoader.js
- C:xampphtdocseasy-portal
ode_modulesloader-runnerlibLoaderRunner.js
- C:xampphtdocseasy-portal
ode_moduleswebpacklibNormalModule.js
- C:xampphtdocseasy-portal
ode_moduleswebpacklibNormalModuleFactory.js
- C:xampphtdocseasy-portal
ode_moduleswebpacklibCompiler.js
- C:xampphtdocseasy-portal
ode_moduleswebpacklibwebpack.js
- C:xampphtdocseasy-portal
ode_moduleswebpack-dev-serverlibServer.js
- C:xampphtdocseasy-portal
ode_moduleswebpack-dev-serverinwebpack-dev-server.js

here is my package.json file:

{
  "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",
    "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-clipboard2": "^0.3.1",
    "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.6.0",
    "webpack-bundle-analyzer": "^2.9.0",
    "webpack-dev-server": "^2.9.1",
    "webpack-merge": "^4.1.0",
    "worker-loader": "^3.0.7"
  },
  "engines": {
    "node": ">= 6.0.0",
    "npm": ">= 3.0.0"
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not ie <= 8"
  ]
}

Any help would be highly appreciable.

question from:https://stackoverflow.com/questions/65932154/cannot-find-module-webpack-lib-web-fetchcompilewasmtemplateplugin

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...