Tuesday, March 3, 2020

[SOLVED] - Couldnt find preset es2015 relative to directory

While starting React App using "npm start" got error message like below

ERROR in ./main.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Couldn't find preset "es2015" relative to directory
    at \node_modules\babel-core\lib\transformation\file\options\option-manager.js:293:19


Solution:

npm install babel-cli babel-preset-es2015

npm install babel-preset-stage-2


then...

npm start

worked as expected, Compiled successfully.

No comments:

Post a Comment

Popular Posts