npm not found when under sudo
[dev@squarepants www]$ sudo npm install -g bbb sudo: npm: command not found Solution You have probably like me installed node with nvm (node version manager). This installs node locally for the user and root...
Just another Yipp.ca Blogs site
[dev@squarepants www]$ sudo npm install -g bbb sudo: npm: command not found Solution You have probably like me installed node with nvm (node version manager). This installs node locally for the user and root...
1 NVM 1.1 Install nvm Note: Get the latest command from https://github.com/creationix/nvm $> curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.9/install.sh | bash $> export NVM_DIR="$HOME/.nvm" $> [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm 1.2 Verify it...
This will install Node.JS Express application and run it forever on port 80 alongside with other VirtualHost on a box with Apache and ISPconfig or Virtualmin. Install MongoDB $> sudo apt-key adv --keyserver keyserver.ubuntu.com...
C:\dev\nodesand>express 'express' is not recognized as an internal or external command, operable program or batch file. Solution: $> npm install express-generator -g
1. Mistake: Assuming string.replace("", "") will replace all occurrences. No !! It just replaces the first one !! var string = "Library of China"; string = string.replace(" ", "-"); string will contain "Library-of China";...
In node.js, if you make change to a module's exported variable, the changes will not propagate to another module that already imported it. So what solution can we do to go around this "caching"...
Well there can be multiple reasons for this error. But in my node.js development with mongoDB, this always occurs when mongoDB could not be started. The solution was always to cleanup old mongod.lock files....
Error: Most middleware (like favicon) is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware. Solution: For Express 4 : // Serve favicon.ico. $> npm install serve-favicon Then in your...
How to npm update module for node.js ? (1) First step is to go to the folder node_module: $> cd vendor/node_modules (modify for your own project) (2) Run npm update <module>, let say the...
Recent Comments