![]() ![]() ![]() Now, npm install will now use exact versions in npm-shrinkwrap.json Lastly, save exact versions to npm-shrinkwrap.json with npm shrinkwrap $ rm npm-shrinkwrap.json #Then do a clean install (w/o the rm I got some dependency warnings) $ rm -rf node_modules # Install and use the `npm-check-updates` package. # `outdated` is part of newer npm versions (2+) If I'd shrinkwrapped, npm would have installed exactly what I needed.įor the curious who make it this far, here is what I recommend: Use npm-check-updates or npm outdated to suggest the latest versions. I pulled out a project the other day and it wouldn't run because my deps were all out of date/updated/a mess. It will list any installed dependencies that have newer versions available.įor Yarn specific solution, refer to this StackOverflow answer.Īncient npm (circa 2014): npm install -g npm-check-updatesīe sure to shrinkwrap your deps, or you may wind up with a dead project. ![]() To see which modules are outdated, just run npm outdated. On the other hand, if you're working in a more mature project, you probably want to verify that there are no breaking changes in your dependencies before upgrading. It's fine if-as you said-the project is empty and nothing can break. Of course, this is the blunt hammer of updating dependencies. ( Note: broken in recent (3.11) versions of npm). Simply change every dependency's version to *, then run npm update -save. Looks like npm-check-updates is the only way to make this happen now.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |