question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v2.2.0 issue with `npx create-react-app`

See original GitHub issue

npx create-react-app test

npx: installed 99 in 6.053s
Must use import to load ES Module: /Users/<REDACTED>/.npm/_npx/93178/lib/node_modules/create-react-app/node_modules/is-promise/index.js
require() of ES modules is not supported.
require() of /Users/<REDACTED>/.npm/_npx/93178/lib/node_modules/create-react-app/node_modules/is-promise/index.js from /Users/<REDACTED>/.npm/_npx/93178/lib/node_modules/create-react-app/node_modules/run-async/index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename /Users/<REDACTED>/.npm/_npx/93178/lib/node_modules/create-react-app/node_modules/is-promise/index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/<REDACTED>/.npm/_npx/93178/lib/node_modules/create-react-app/node_modules/is-promise/package.json.```

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
RyanZimcommented, Apr 25, 2020

Duplicate of https://github.com/then/is-promise/issues/12; package is currently broken. Pin to 2.1.0 until the issue is fixed.

0reactions
ForbesLindesaycommented, Apr 25, 2020

It should now be resolved. Since there are 4 issues about this, I’m going to close this issue in favour of #20. Please comment there if 2.2.1 does not fix your issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Last call for Create React App v2 #5103 - GitHub
Migrating from 1.1.15 to 2.0.1. Inside any created project that has not been ejected, run: $ npm install --save --save-exact react-scripts@2.0.
Read more >
Create React App 2.0: Babel 7, Sass, and More
Upgrading a non-ejected project to Create React App 2.0 should usually be straightforward. Open package.json in the root of your project and ...
Read more >
Create React App not installing, showing an error and ...
PS C:\Users\mdbel\Desktop\Project\redux> npx create-react-app learnredux Creating a new React app in C:\Users\mdbel\Desktop\Project\redux\learnredux. Installing ...
Read more >
NPX Create React APP Not Working - YouTube
To create a new React App, we use npx command with create - react - app and then project name. It should create...
Read more >
Create React App
Whether you're using React or another library, Create React App lets you focus on code, not build tools. To create a project called...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found