Edit: Adding ~/npm/bin to path with PATH=$PATH:~/npm/bin helped, thank you Joachim Isaksson
EDIT:
Seems like i cannot install any packages with npm. After sucessfully installing them, i cannot use them with the assigned commands in the package. "No command '' found".
node -v
v0.11.14
npm -v
2.0.0
At ubuntu machine
It seems like i cannot install the resume-cli module, found here with using npm. Even though it installs without errors, it does not understand the basic commands after installing. Could it be a problem with the warning, showed under?
sudo npm install -g resume-cli
i get
npm WARN engine html-to-text@0.0.8: wanted: {"node":"~0.8.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
Then
/home/bjornasm/npm/bin/resume -> /home/bjornasm/npm/lib/node_modules/resume-cli/index.js
resume-cli@0.3.10 /home/bjornasm/npm/lib/node_modules/resume-cli
├── cli-spinner@0.1.5
├── char-spinner@1.0.1
├── commander@2.3.0
├── colors@0.6.2
├── open@0.0.5
├── chalk@0.4.0 (has-color@0.1.7, ansi-styles@1.0.0, strip-ansi@0.1.1)
├── async@0.9.0
├── read@1.0.5 (mute-stream@0.0.4)
├── terminal-menu@0.3.2 (inherits@2.0.1, charm@0.1.2, resumer@0.0.0)
├── superagent@0.18.2 (extend@1.2.1, qs@0.6.6, methods@1.0.1, cookiejar@2.0.1, component-emitter@1.1.2, reduce-component@1.0.1, mime@1.2.11, debug@1.0.4, readable-stream@1.0.27-1, form-data@0.1.3, formidable@1.0.14)
├── resume-to-text@0.0.15 (mustache@0.8.2, html-to-text@0.0.8)
├── resume-to-html@0.0.21 (gravatar@1.0.6, resume-to-markdown@0.0.14, marked@0.3.2, mustache@0.8.2, lodash@2.4.1)
├── jsonlint@1.6.2 (nomnom@1.8.0, JSV@4.0.2)
└── resume-schema@0.0.15 (z-schema@2.4.10)
Then when running the following
resume --help
i get
resume: command not found
Anyone familiar with this?
Below are the steps to install a given release from source NOTE - this installs nodejs which gives you both node as well as npm, they come together per release.
to start fresh remove prior node.js and npm installs as well as these :
sudo mv ~/.npmrc ~/.npmrc_ignore
sudo mv ~/.npm ~/.npm_ignore
sudo mv ~/tmp ~/tmp_ignore
sudo mv ~/.npm-init.js ~/.npm-init.js_ignore
to install nodejs and npm as yourself NOT root do these commands (OSX/linux) :
export NODE_PARENT=${HOME}/bin_0_10_32
mkdir ${NODE_PARENT}
download source from : http://nodejs.org/download/
cd node-v0.xxxx
./configure --prefix=${NODE_PARENT}/nodejs
make -j8
make install # IMPORTANT this is NOT using sudo
# not wanted since installing into $USER owned $NODE_PARENT
which puts it into dir defined by above --prefix
export PATH=${NODE_PARENT}/nodejs/bin:$PATH
define environment variable NODE_PATH so node can find dir for modules otherwise npm install xxx will put newly installed module into current dir :
export NODE_PATH=${NODE_PARENT}/nodejs/lib/node_modules
when you use syntax : npm install -g some_cool_module the -g for global installs it into dir $NODE_PATH and not your $PWD
nodejs install gives you npm as well :
ls -la ${NODE_PARENT}/nodejs/bin
Subsequent modules you install using global flag -g will automagically put their ~binaries~ into above bin dir ... like browserify
Now put above three export xxx=yyy commands into your ~/.bashrc or some such so your environment is setup