问题
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.
回答1:
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
回答2:
I would:
- Restart the machine. Ensure you log out of your session if needed
- Re-install Create React App
- Uninstall yarn and reinstall
- Reinstall node, ensure you use a newer version
- Use a different network connection, maybe something is being blocked by a firewall
回答3:
I would: change my node version.
Refer the following link
回答4:
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.
来源:https://stackoverflow.com/questions/61428440/npx-create-react-app-not-working-must-use-import-to-load-es-module