Error: Cannot find module ‘@vue/babel-preset-application’

less than 1 minute read

After Upgrading vue-cli from v3 to v4, you got an error message like below on typing any npm script.

 ERROR  Error: Cannot find module '@vue/babel-preset-application' 

The message occurred because of babel setting. So you must fix babel.config.js like below.

// from vue-cli v3
module.exports = {
  presets: ['@vue/application'],
};

// to vue-cli v4
module.exports = {
  presets: ['@vue/cli-plugin-babel/preset'],
};

This github pull request could be refered. That’s all. Good luck.

Leave a comment