Open lsaffre opened 3 months ago
Run npm uninstall -g create-react-app
to remove the global create-react-app package.
Then, try using npx create-react-app my-app
again.
npx will automatically download the latest version of create-react-app and use it to set up your project.
Run npm
uninstall -g create-react-app
to remove the global create-react-app package. Then, try usingnpx create-react-app my-app
again.npx will automatically download the latest version of create-react-app and use it to set up your project.
Thanks for your suggestion. Unfortunately it didn't help. Your suggestion gave me the idea to try "sudo apt remove npm" followed by "sudo apt install npm". But this too didn't help.
this problem happens to me also and i just migrate my app to the now version
Describe the bug
I am quite new to the world of npm. When I say "npx create-react-app my-app; cd my-app; npm start" as instructed on the Getting Started page, I get an error message "Cannot find module 'ajv/dist/compile/codegen'"
Did you try recovering your dependencies?
I had to manually say
npm install --save-dev ajv
to get it to work.I report this as an issue because it's obviously not intended behaviour, and it's not a nice welcome to beginners. If this happens only on my machine, then I'd like to understand what's wrong with my environment.
Environment
I am using npm version 10.8.2 I did "npm install -g npm@latest" as recommended, removed the my-app directory and tried again, but the issue remains.
Environment Info:
current version of create-react-app: 5.0.1 running from /home/luc/.npm/_npx/c67e74de0542c87c/node_modules/create-react-app
System: OS: Linux 6.5 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish) CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz Binaries: Node: 20.15.1 - /usr/local/bin/node Yarn: 1.22.22 - /usr/local/bin/yarn npm: 10.8.2 - /usr/local/bin/npm Browsers: Chrome: Not Found npmPackages: react: ^18.3.1 => 18.3.1 react-dom: ^18.3.1 => 18.3.1 react-scripts: 5.0.1 => 5.0.1 npmGlobalPackages: create-react-app: Not Found
Steps to reproduce
As instructed on https://create-react-app.dev/docs/getting-started :
Expected behavior
No error message and the browser starting at http://localhost:3000
Actual behavior