npx create-react-app not working "Must use import to load ES Module:" [closed]
Asked Answered
S

4

7

error message

I've tried reinstalling node and removing appdata/roaming/npm and npm-cache. I've created several apps before so i'm not sure what's going on. Any help is appreciated.

Swiger answered 25/4, 2020 at 15:55 Comment(6)
Also running into this issue just now. Node version: 12.16.2. NPM -v: 6.9.0. create-react-app version: 3.4.1. Have tried solutions from other pages, using esm and listing type: modules in the package.json to no avail. Probably since this is within node_modules itself. Will reply with any solution I encounter, even if just going back to prior node version.Irremediable
Also having the same problem, node -v 12.16.2, NPM -v 6.14.4. Just made fresh installation of Node.js and ran in to this. Windows 10.Boccie
just tested again, it should be working nowFernand
@Fernand which node version are you on? I'm on v12.16.2Swiger
It's working again! Not sure what the problem was, came back after watching a movie and it's alive and well again. Thank you all for the responsesSwiger
@RobertDanielsson sorry I didnt notice your comment. i was using the LTS version which was 12.16.2 same as yours but I upgraded to version 14.0.0 to test whether it works on latest version. not sure whether I should downgrade back or notFernand
C
5

this issue is fixed with 2.2.2 version of is-promise package. If you still experience problems creating new CRA, consider npm install -g --force create-react-app

If even then bug is still present, please comment your issue to this github issue

Cristie answered 25/4, 2020 at 19:40 Comment(0)
P
2

I would:

  1. Restart the machine. Ensure you log out of your session if needed
  2. Re-install Create React App
  3. Uninstall yarn and reinstall
  4. Reinstall node, ensure you use a newer version
  5. Use a different network connection, maybe something is being blocked by a firewall
Prieto answered 25/4, 2020 at 16:0 Comment(1)
I tried following your steps but unfortunately it didn't solve my problem. Btw just wanted to say i'm pretty stoked to see you comment on my post, almost everyone in my episerver class used your articles. So thank you for helping us out :-)Swiger
A
0

I would: change my node version.

Refer the following link

Abrego answered 25/4, 2020 at 16:14 Comment(1)
Per a github problem thread, looks like this is a recurring issue in and out of node versions. Keeps coming back, then getting fixed, then coming back again. Apparently Working: 12.11.1, 12.12.0, Broken: 12.11.0, 12.13.1, 13.2.0. Add in not working with mine, 12.16.2. Works fine on node 8 with my old projects, but not much help knowing that :). Lot of servers I have been setting up have only gone up to 12.4.0, so may just go there and see if works. Trying to get up to a later LTS myself.Irremediable
S
0

I read up on all the comments saying that this seems to be a recurring problem, and perhaps a temporary one. I looked at Bloodshot the movie and came back, tried again and it now works. Only thing i changed was trying it in a different folder (which i did multiple times before). Perhaps it was Vin diesel doing some magic or there was some problem with npm. Not sure but it works now and im thankful for it, and all the responses.

Swiger answered 25/4, 2020 at 19:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.