Ubuntu 12.04 and using Chris Lea’s PPA for install the following works for me:
npm config set prefix '~/.npm-packages'
and adding $HOME/.npm-packages/bin
to $PATH
Append to .bashrc
export PATH="$PATH:$HOME/.npm-packages/bin"
For more see this answer from @passy
More Related Contents:
- How can I update NodeJS and NPM to their latest versions?
- How to use executables from a package installed locally in node_modules?
- Cannot install packages using node package manager in Ubuntu
- Node – was compiled against a different Node.js version using NODE_MODULE_VERSION 51
- NPM: npm-cli.js not found when running npm
- How to include scripts located inside the node_modules folder?
- Cannot install NodeJs: /usr/bin/env: node: No such file or directory
- Install Node.js on Ubuntu
- npm install doesn’t create node_modules directory
- npm: When to use `–force` and `–legacy-peer-deps`
- When I run `npm install`, it returns with `ERR! code EINTEGRITY` (npm 5.3.0)
- libsass bindings not found when using node-sass in nodejs
- What could cause an error related to npm not being able to find a file? No contents in my node_modules subfolder. Why is that?
- Find the version of an installed npm package
- NPM Install Error:Unexpected end of JSON input while parsing near ‘…nt-webpack-plugin”:”0’
- Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
- How to install a private NPM module without my own registry?
- How to install a previous exact version of a NPM package?
- Fixing npm path in Windows 8 and 10
- NPM stuck giving the same error EISDIR: Illegal operation on a directory, read at error (native)
- node 5.5.0 already installed but node -v fetches with “v4.2.1” on OS X & homebrew?
- How do you prevent install of “devDependencies” NPM modules for Node.js (package.json)?
- Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE Phonegap Installation
- How to Delete node_modules – Deep Nested Folder in Windows
- How to install npm -g on offline server
- npm install hangs
- Error “npm WARN package.json: No repository field”
- Jest gives `Cannot find module` when importing components with absolute paths
- Is there any way to fix package-lock.json lockfileVersion so npm uses a specific format?
- Cannot uninstall angular-cli