I'm trying to update my node packages/modules and a lot of people (many from StackOverflow) recommended 'npm-check-updates' so I downloaded via npm and ran it. It gave me this error and I'm not sure what's wrong. Is something wrong with my PATH variable in system settings or something? I can't seem to find anything useful with searching Google. Thank you!
Package.json not found error when updating using npm-check-updates
971 views Asked by Sticky At
1
npm-check-updates
node module requires package.json file to check for the versions that your application is currently using. From the code, it looks for particularlypackage.json
in the current directory to read application dependencies and throws an error if the file is not found.Github Source Code
If
package.json
file exists, the module checks which packages can be updated to a higher version and are outdated. Once you review the suggestions and manually verifiy, you would want to run the module with-u
option, which will automatically upgrade thepackage.json
file with the newer version numbers of the dependencies. Once this is done, you can runnpm install
to download the latest versions.Here is an example of running this update.
It is recommended to use semantic versioning in your
package.json
file, you can learn more onpackage.json
best practices.