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
  • #9655
Closed
Open
Issue created Sep 16, 2020 by Administrator@rootContributor

`npm run build` fails to compile on a fresh unmodified CRA app ("Class constructor Parser cannot be invoked without 'new'")

Created by: jebeck

Describe the bug

Completely fresh and unmodified create-react-app app fails to build with npm run build. Error is Class constructor Parser cannot be invoked without 'new':

Screen Shot 2020-09-16 at 15 53 24

Did you try recovering your dependencies?

Probably N/A since completely fresh, unmodified output of initial npx create-react-app... command, but yep, I did try. Did not help.

Which terms did you search for in User Guide?

Had a glance through the build section again, searched Google, and searched issues here for the specific error.

Environment

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

  System:
    OS: macOS 10.15.6
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 12.18.3 - /var/folders/pq/gd8qpx2s5b95t3jnvrrx0nh40000gq/T/fnm-shell-2477482/bin/node
    Yarn: Not Found
    npm: 6.14.8 - /var/folders/pq/gd8qpx2s5b95t3jnvrrx0nh40000gq/T/fnm-shell-2477482/bin/npm
  Browsers:
    Chrome: 85.0.4183.102
    Firefox: Not Found
    Safari: 13.1.2
  npmPackages:
    react: Not Found
    react-dom: Not Found
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found

And my coworker's, who verified the failure:

Environment Info:
  current version of create-react-app: 3.4.1
  running from /Users/robertharris/.npm/_npx/92901/lib/node_modules/create-react-app
  System:
    OS: macOS 10.15.6
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 14.9.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.14.7 - /usr/local/bin/npm
  Browsers:
    Chrome: 85.0.4183.102
    Firefox: Not Found
    Safari: 13.1.2
  npmPackages:
    react: ^16.13.1 => 16.13.1 
    react-dom: ^16.13.1 => 16.13.1 
    react-scripts: 3.4.3 => 3.4.3 
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

  1. npx create-react-app foo
  2. cd foo/
  3. npm run build

I also tried npx [email protected]... to see if going back one minor version would change anything, but the result was the same.

Expected behavior

A fresh unmodified CRA app should build successfully.

Actual behavior

Screen Shot 2020-09-16 at 15 53 24 (Same screenshot as above.)

Reproducible demo

Pushed my fresh unmodified CRA app here: https://github.com/jebeck/cra-build-failure

So just clone, npm i, and npm run build. I have also tested on a 3rd machine (in addition to mine and my coworker's) and I get the same failure.

Assignee
Assign to
Time tracking