then / is-promise

Test whether an object looks like a promises-a+ promise
MIT License
282 stars 32 forks source link

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

Closed xfer closed 4 years ago

xfer commented 4 years ago

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.```
RyanZim commented 4 years ago

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

jovanailin commented 4 years ago

I am having the same issue with the same environment. I need the solution as quick as possible because I am overdue with a school project. Please someone help!

alexmercier25 commented 4 years ago

same for me :/

sudir81 commented 4 years ago

I have the same issue, i tried all possible ways npx create-react-app yarn create react-app create-react-app

all are throwing same error

i have node (12.16.2), npm (6.14.4), yarn (1.21.1).

ghost commented 4 years ago

got same issue...

siyavash4812 commented 4 years ago

Same issue but it happened when I added a new dependency to my react app 'video.js'

aicayzer commented 4 years ago

same issue here

alexmercier25 commented 4 years ago

I've wrote a tweet, hope it goes to them... https://twitter.com/TheBuildex/status/1254097388081463296

RyanZim commented 4 years ago

More detailed workaround for create-react-app https://github.com/facebook/create-react-app/issues/8896#issuecomment-619406384

juank11memphis commented 4 years ago

Same problem here :(

alexmercier25 commented 4 years ago

Workaround worked for me :) hope this get fixed soon though: https://github.com/facebook/create-react-app/issues/8896#issuecomment-619406384

ed-f-jones commented 4 years ago

Same here and my project is due in four days.

mbreth commented 4 years ago

Same here. Nothing is working

ForbesLindesay commented 4 years ago

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.