I'm trying to install Yeoman via npm, but I get the following errors when I run npm install -g yo
:
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
/home/marieficid/.node/bin/yo -> /home/marieficid/.node/lib/node_modules/yo/lib/cli.js
> yo@1.6.0 postinstall /home/marieficid/.node/lib/node_modules/yo
> yodoctor
Yeoman Doctor
Running sanity checks on your system
✔ Global configuration file is valid
✖ Node.js version
Your Node.js version is outdated.
Upgrade to the latest version: https://nodejs.org
✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory
✖ npm version
Your npm version is outdated.
Upgrade to the latest version by running:
npm install -g npm
✔ NODE_PATH matches the npm root
Found potential issues on your machine :(
/home/marieficid/.node/lib
└── yo@1.6.0
Which is very odd because when I run node --version && npm --version
I get:
v4.3.1
3.7.3
And when I try to run npm install -gn
I get:
/home/marieficid/.node/bin/n -> /home/marieficid/.node/lib/node_modules/n/bin/n
/home/marieficid/.node/lib
└── n@2.1.0
I tried running this solution , which only brought me more issues: Now I can't run node --version
, only n --version
, which returns 2.1.0, and I can't run npm install -gn
because I get this:
marieficid@mariana-K46CB:~$ npm install -g n
/usr/bin/env: node: Arquivo ou diretório não encontrado
Which means "directory not found". What can I do? I'm on Ubuntu 14.04, by the way.
EDIT: I think I screwed up my $PATH variable... does anyone know how to fix it?
You should run
npm install -g npm
not
npm install -g n
according to your output
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.