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
  • #4154
Closed
Open
Issue created Mar 14, 2018 by Administrator@rootContributor

BABEL error when running `yarn` in create-react-app

Created by: sowhatdoido

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes

yarn --version 1.5.1

Which terms did you search for in User Guide?

(Write your answer here if relevant.)

Environment

  1. node -v: v8.9.4
  2. npm -v: 5.6.0
  3. yarn --version (if you use Yarn): 1.5.1
  4. npm ls react-scripts (if you haven’t ejected): └── react-scripts@1.1.0 -> /Users/fratran/projects/create-react-app/packages/react-scripts extraneous

npm ERR! extraneous: react-scripts@1.1.0 /Users/fratran/projects/create-react-app/node_modules/react-scripts

Then, specify:

  1. Operating system: OSX Sierra 10.12.6
  2. Browser and version (if relevant):

Steps to Reproduce

(Write your steps here:)

  1. Clone CRA into a new folder (git clone https://github.com/facebook/create-react-app.git)
  2. Go to the created directory (cd create-react-app)
  3. Run Yarn (yarn)

Expected Behavior

node_modules folder gets generated, dependencies download without error, compiling iframeScripts.js finishes without error.

Actual Behavior

Failed to compile message occurs when compiling iframeScript.js followed by the following error

Compiling iframeScript.js
Failed to compile.

ERROR in ./src/iframeScript.js
Module build failed: TypeError: [BABEL] /Users/fratran/projects/create-react-app/packages/react-error-overlay/src/iframeScript.js: Cannot read property 'slice' of undefined (While processing: "/Users/fratran/projects/create-react-app/node_modules/babel-preset-react-app/index.js$3")
    at throwVersionError (/Users/fratran/projects/create-react-app/node_modules/@babel/helper-plugin-utils/lib/index.js:41:15)
    at Object.assertVersion (/Users/fratran/projects/create-react-app/node_modules/@babel/helper-plugin-utils/lib/index.js:11:11)
    at /Users/fratran/projects/create-react-app/node_modules/@babel/plugin-proposal-object-rest-spread/lib/index.js:15:7
    at /Users/fratran/projects/create-react-app/node_modules/@babel/helper-plugin-utils/lib/index.js:16:12
    at /Users/fratran/projects/create-react-app/node_modules/@babel/core/lib/config/index.js:167:14
    at cachedFunction (/Users/fratran/projects/create-react-app/node_modules/@babel/core/lib/config/caching.js:40:17)
    at loadPluginDescriptor (/Users/fratran/projects/create-react-app/node_modules/@babel/core/lib/config/index.js:202:28)
    at /Users/fratran/projects/create-react-app/node_modules/@babel/core/lib/config/index.js:59:16
    at Array.map (<anonymous>)
    at recurseDescriptors (/Users/fratran/projects/create-react-app/node_modules/@babel/core/lib/config/index.js:58:36)
    at recurseDescriptors (/Users/fratran/projects/create-react-app/node_modules/@babel/core/lib/config/index.js:92:27)
    at loadConfig (/Users/fratran/projects/create-react-app/node_modules/@babel/core/lib/config/index.js:108:6)
    at /Users/fratran/projects/create-react-app/node_modules/@babel/core/lib/transform.js:26:33
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
✨  Done in 4.52s.
✨  Done in 31.53s.

Reproducible Demo

You can reproduce this with this base repo, and I've experienced it on multiple coworker's computers.

Assignee
Assign to
Time tracking