Reputation: 151
I have Node js running on my Raspberry pi. When I run $ node -v it gives me the version number but when I run $ sudo node -v It returns node: not found
I need to run it as root, any ideas?
Upvotes: 1
Views: 368
Reputation: 163548
When you run it as root, your path is different. If you modify your path as root, or specify the full path to the Node.js executable, it will work.
Upvotes: 7