"npm start" error if there is a .babelrc file in parent folder
Created by: forclan
if I have a folder named "React" or some other name.
run create-react-app test-react
in folder React
cd ./test-react
run npm start
it works fine;
but if I put a .babelrc file in folder "React"
echo "{presets: ['es2015']}" > ../.babelrc
and run npm start
if will cause a error:
Failed to compile. Error in ./src/index.js Module build failed: Error: Couldn't find preset "es2015" relative to directory "/Users/forclan/Documents/Javascript/React" at Array.map (native) @ multi main
It seems that react-scripts
will find a .babelrc
file the way up to "~"(if i put the .babelrc file in my home folder,it will generate the same error);