I'm installing a new react app using nextjs docs:
npx create-next-app
for some reason its using yarn by default:
I'm used to working with npm commands, how can I fix it please ?
EDIT: npx create-next-app my-app --use-npm
https://github.com/vercel/next.js/issues/10647
OLD ANSWER:
Remove yarn.lock
and node_modules/
rm yarn.lock
rm -rf node_modules
install your dependencies with npm:
npm install
this will create a package-lock.json
file, analogous to yarn.lock
.
I tried the answer by @Rodrigo Amaral but faced several errors.
Before deleting the node_modules and yarn.lock, I ran npm install, which created a package-lock.json.
So the workflow is
npm install
rm yarn.lock
rm -rf node_modules
npm install
This should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With