foreword
When making a new purpose, I need npm to install the package @graphprotocol/graph-cli, but I found that the library cannot be connected to the Internet, so I asked my colleagues for dependencies, researched it myself, and installed it manually globally.
Prerequisites
- npm needs to be installed
- The package to install.
installation steps
- View the package path of the local npm -g
npm root -g
- Copy the package to this path
- Execute the command to install the package, take this example as an example:
npm i -g @graphprotocol/[email protected]
- Successful installation
Notice
If it doesn't work, you can clear the cache first:
npm cache clean -f
Be sure to execute step 3, otherwise execute
npm list -g --depth 0
It will happen: