Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # here i'm in my home dir, and try to run "npm outdated", as of course will fail as it should be run from the ~/.node-red folder...
- [pi@mylinux] ~
- $ npm outdated
- # then i created an alias that FIRST changes to the right directory, THEN runs npm, with whatever option you pass to it, of course...
- [pi@mylinux] ~
- $ alias npm="cd ~/.node-red;npm "
- # so if i now AGAIN, from my HOME dir, run the same command, it works :)
- [pi@mylinux] ~
- $ npm outdated
- Package Current Wanted Latest Location
- i2c-bus 3.1.0 3.2.0 3.2.0 pi
- moment 2.22.0 2.22.1 2.22.1 pi
- node-red-contrib-bigtimer 1.8.1 1.8.1 1.9.2 pi
- node-red-contrib-chatbot 0.10.3 0.10.3 0.12.2 pi
- node-red-dashboard 2.9.0 2.9.1 2.9.1 pi
- # and you're left in the ~/.node-red folder so you can do other commands, of course... you can see it from the prompt and with the "pwd" command
- [pi@mylinux] ~/.node-red
- $ pwd
- /home/pi/.node-red
- # for example using NCU to check for updates (install it with "sudo npm i -g npm-check-updates"):
- [pi@mylinux] ~/.node-red
- $ ncu -u
- Using /home/pi/.node-red/package.json
- [..................] | :
- node-red-contrib-bigtimer ~1.8.1 → ~1.9.2
- node-red-contrib-chatbot ~0.10.3 → ~0.12.2
- i2c-bus ^3.1.0 → ^3.2.0
- moment ^2.18.1 → ^2.22.1
- node-red-dashboard ~2.9.0 → ~2.9.1
- Upgraded /home/pi/.node-red/package.json
- # after NCU has updated your package.json, you can use npm install to update to latest packages versions
- [pi@mylinux] ~/.node-red
- $ npm -s install
- pi@1.0.0 /home/pi/.node-red
- +-- node-red-contrib-bigtimer@1.9.2
- `-- node-red-contrib-chatbot@0.12.2
- +-- @slack/client@3.16.0
- | +-- lodash@4.17.10
- | `-- winston@2.4.2
- +-- node-telegram-bot-api@0.30.0
- | `-- eventemitter3@3.1.0
- +-- prettyjson@1.2.1
- | `-- colors@1.2.3
- `-- underscore@1.9.0
- +-- i2c-bus@3.2.0
- +-- moment@2.22.1
- `-- node-red-dashboard@2.9.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement