NPM run dev encountered an error:
Module build failed: Error: Couldn't find preset "es2015" relative to directory "/Users/wdx/Desktop/Adjuster"
When we encounter this problem, we need to install babel-preset-es2015
:
npm install babel-preset-es2015 --save-dev
After executing this command, install babel-preset-es2015 and it will not report errors. npm run dev```
Similar Posts:
- vue ‘Couldn’t find preset “es2015” relative to directory’
- [Solved] Vue installation Babel dependency error
- Nuxt module build failed error report
- [Two Solutions] Syntax error: unexpected token import
- Cannot find module ‘@babel/core’ [How to Solve]
- [Solved] app crashed – waiting for file changes before starting…
- [Solved] Vue/cli install element error: Error: cannot find module ‘Babel plugin component’
- [Solved] Node.js runs ES6 default import file error: import m1 from’./m1.js’ ^^ SyntaxError: Unexpected identifier
- [Solved] NPM Run Project Error: Cannot find module ‘@babel/compat-data/corejs3-shipped-proposals’
- webpack4 Cannot find module ‘@babel/core’ [Solved]