SoFunction
Updated on 2025-04-04

Solve the error report of vue operation:Cannot find module '@vue/cli-plugin-babel'

Today, I moved the VUE project to a new computer, and the configuration was different, resulting in an error:

Error: Cannot find module '@vue/cli-plugin-babel'
Require stack:
- D:\WWW\VUE\xxxxxx\node_modules\.store\@vue+ [email protected] D:\WWW\VUE\xxxxxx\node_modules\.store\@[email protected]\node_modules\@vue\cli-service\lib\
- D:\WWW\VUE\xxxxxx\node_modules\.store\@vue+ [email protected] D:\WWW\VUE\xxxxxx\node_modules\.store\@[email protected]\node_modules\@vue\cli-service\bin\
at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
at Module._load (node:internal/modules/cjs/loader:920:27)
at (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at idToPlugin (D:\WWW\VUE\xxxxxx\node_modules\.store\@vue+ [email protected] at idToPlugin (D:\WWW\VUE\xxxxxx\node_modules\.store\@[email protected]\node_modules\@vue\cli-service\lib\:172:14)
at D:\WWW\VUE\xxxxxx\node_modules\.store\@vue+ [email protected] at D:\WWW\VUE\xxxxxx\node_modules\.store\@[email protected]\node_modules\@vue\cli-service\lib\:211:20
at (D:\WWW\VUE\xxxxxx\node_modules\.store\@vue+ [email protected] at (D:\WWW\VUE\xxxxxx\node_modules\.store\@[email protected]\node_modules\@vue\cli-service\lib\:198:10)
at Object.<anonymous> (D:\WWW\VUE\xxxxxx\node_modules\.store\@vue+ [email protected] at Object.<anonymous> (D:\WWW\VUE\xxxxxx\node_modules\.store\@[email protected]\node_modules\@vue\cli-service\bin\:15:17) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'D:\\WWW\\VUE\\xxxxxx\\node_modules\\.store\\@vue+ [email protected] 'D:\\WWW\\VUE\\xxxxxx\\node_modules\\.store\\@[email protected]\\node_modules\\@vue\\cli-service\\lib\\',
'D:\\WWW\\VUE\\xxxxxx\\node_modules\\.store\\@vue+ [email protected]\\node_modules\\@vue\\cli-service\\bin\\'
]
}

After deleting the node_modules folder, execute the command

npm update

Still reported an error missing "@vue/cli-plugin-babel"

I searched for a long time online before I found a piece of words.

Reason: The current computer nodejs version is too high, the project configuration is too low, and it does not match, as follows

{
 
  "dependencies": {
    "node-sass": "^4.13.1",
    "sass-loader": "^7.3.1",
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.15",
  },
  
}

The correspondence between node version and node-sass version:

View the address of the document:/package/node-sass

Solution: Delete these lines of configuration and reinstall.

npm install node-sass
npm install sass-loader
npm install @vue/cli-plugin-babel

Rerun the problem

npm run serve

Summarize

This is the article about solving the error error of vue operation: Cannot find module '@vue/cli-plugin-babel'. This is all about this. For more related error error content of vue operation, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!