![]() ![]() Option 1: edit your Windows installation's PATH to put %appdata%\npm before %ProgramFiles%\nodejs. ![]() On your PATH, it will always use the version of npm installed with node instead of the version of npm you installed using npm -g install get around this, you can do one of the following: Npm's globally installed packages (including, potentially, npm itself) are stored separately in a user-specific directory (which is currently There are no exercises for this lesson.By default, npm is installed alongside node in If you want to update all of your outdated global packages at once, enter the following command in your terminal: npm update -g Exercises You can run the npm outdated -g -depth=0 command one more time to make sure the package was updated. If you updated gatsby-cli correctly, you should see something similar to the following print out to your terminal (your version number may be different): + 21 packages from 10 contributors and updated 38 packages in 6.49s For example, if you wanted to update the gatsby-cli package, you would enter the following command in your terminal: npm update -g gatsby-cli If you want to update a specific global package, you can add the name of the package to the command. Gatsby-cli 2.6.4 2.7.39 2.7.39 Update a single global package In this example, the gatsby-cli package is out-of-date. If you have any outdated global packages, you should see something like the following print out. To do this, enter the following command in your terminal: npm outdated -g -depth=0 To update a single global package, enter the following command in your terminal: npm update -g package-name Details Check for outdated packagesīefore updating any packages, you should first check which global packages are outdated. ![]() To update all global packages, enter the following command in your terminal: npm update -g To check for outdated global packages, enter the following command in your terminal: npm outdated -g -depth=0 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |