Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #233
Closed
Open
Issue created Jul 27, 2016 by Administrator@rootContributor

"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);

Assignee
Assign to
Time tracking