What version of npm
(and node
) are you using?
npm
v7 has been released, and it ships with node
v15. That introduces some big changes due to the new support for workspaces ... which introduces package-lock.json
v2.
I'm going to go out on a limb: I suspect you're running npm
v7 locally and your EC2 instances are not.
https://github.blog/2020-10-13-presenting-v7-0-0-of-the-npm-cli/
I was able to reproduce issue from OP's question on my computer by running
npm install -g npm@7
and then running
npx create-react-app my-app
Inspecting my-app/package-lock.json confirmed changed behaviour.
I then downgraded npm to 6.14.11 using
npm install -g npm
Deleted folder my-app and repeated create-react-app
step above. This time, inspecting my-app/package-lock.json confirmed "normal" behaviour.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.