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
  • #8999
Closed
Open
Issue created May 13, 2020 by Karl Horky@karlhorky

babel-preset-react-app: Upgrade @babel/preset-react to 7.9.4 to restore `pragmaFrag` default

Describe the bug

With the current version of babel-preset-react-app, @babel/preset-react is pinned to 7.9.1, which causes errors like this one from Emotion:

https://github.com/emotion-js/emotion/issues/1820

transform-react-jsx: pragma has been set but pragmaFrag has not been set

This has been fixed in @babel/preset-react@7.9.4:

https://github.com/babel/babel/pull/11324#issuecomment-603101768

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

  • pragmaFrag
  • babel
  • preset
  • react

Found https://github.com/facebook/create-react-app/pull/8709, which is inexplicably closed.

Environment

Environment Info:

  current version of create-react-app: 3.4.1
  running from /Users/k/.npm/_npx/28361/lib/node_modules/create-react-app

  System:
    OS: macOS 10.15.4
    CPU: (4) x64 Intel(R) Core(TM) i7-6567U CPU @ 3.30GHz
  Binaries:
    Node: 13.12.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - /usr/local/bin/npm
  Browsers:
    Chrome: 81.0.4044.138
    Firefox: 75.0
    Safari: 13.1
  npmPackages:
    react: ^16.13.1 => 16.13.1
    react-dom: ^16.13.1 => 16.13.1
    react-scripts: 3.4.1 => 3.4.1
  npmGlobalPackages:
    create-react-app: 1.3.3

Steps to reproduce

  1. Install Emotion and use as described on the homepage
  2. See the error with pragmaFrag

Expected behavior

No error with pragmaFrag

Actual behavior

Error with pragmaFrag

Reproducible demo

https://github.com/upleveled/react-components-props-state-may-2020

Remove this line: https://github.com/upleveled/react-components-props-state-may-2020/blob/6a0710a88489481ad84dbda4e382ad6ab0e61a07/src/Counter.js#L2

Assignee
Assign to
Time tracking