mike-works / vscode-fundamentals

👨‍🏫 Mike's Visual Studio Code Course
https://frontendmasters.com/courses/visual-studio-code/
BSD 3-Clause "New" or "Revised" License
201 stars 108 forks source link

package and package-lock.json mismatch #379

Open CoderOO7 opened 3 years ago

CoderOO7 commented 3 years ago

System Information

OS: Linux parrot npm Version: 6.13.4 node Version: v8.17.0

Bug

After latest pull today got this error when I install modules using npm ci. The reason is package and package-lock.json are not sync because package-lock.json is added to .gitignore. As I know it's best practice to always commit package.json and package-lock.json both files to repo.

Error Log

error Invalid: lock file's koa@2.13.0 does not satisfy koa@2.13.1
error Invalid: lock file's @types/koa@2.11.6 does not satisfy @types/koa@2.11.7
error Invalid: lock file's @types/react@16.14.2 does not satisfy @types/react@16.14.3
error Invalid: lock file's @types/webpack@4.41.25 does not satisfy @types/webpack@4.41.26
error Invalid: lock file's webpack@4.44.2 does not satisfy webpack@4.46.0

Solution

Remove package-lock.json from .gitignore file and recommit the both sync files.