2015-06-08 41 views
15

Na Windows 7 64 bit. Zainstalowałem Node.js za pośrednictwem kreatora, który dał mi npm."Twoja wersja npm jest nieaktualna." ale nie jest. Podczas instalacji yo

Uruchamiam npm zainstalować -g yo i uzyskać następujące

Twoja wersja npm jest przestarzała.

pełna moc:

C:\Users\dlite922>npm install -g yo 
| 


> [email protected] postinstall C:\Users\dlite922\AppData\Roaming\npm\node_modules\yo\node_modules\cross-spawn\node_modules\spaw 
> node postinstall 

C:\Users\dlite922\AppData\Roaming\npm\yo -> C:\Users\dlite922\AppData\Roaming\npm\node_modules\yo\lib\cli.js 

> yo[email protected] postinstall C:\Users\dlite922\AppData\Roaming\npm\node_modules\yo 
> yodoctor 


Yeoman Doctor 
Running sanity checks on your system 

√ Global configuration file is valid 
√ NODE_PATH matches the npm root 
√ Node.js version 
× npm version 

Your npm version is outdated. 

Upgrade to the latest version by running: 
npm install -g npm 

See this guide if you're having trouble upgrading: 
https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows 

√ No .bowerrc file in home directory 
√ No .yo-rc.json file in home directory 

Found potential issues on your machine :(
[email protected] C:\Users\dlite922\AppData\Roaming\npm\node_modules\yo 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], take 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], nested-error-stack 
[email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected] 
├── [email protected] 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected] 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 

Jeszcze mam dość najnowszą wersję npm:

C:\Users\dlite922>npm -v 
2.10.1 

I po troubelshooting i położyłem% AppData% npm PRZED nodejs w moim% PATH liście%, ale nadal otrzymuj odpowiedź powyżej.

Powodzenia?

PS: Tak przy okazji, ten średni stos jest tak niezorganizowany. Jest 50 milionów sposobów instalacji i wszyscy reklamują szybką dwuetapową instalację na swojej stronie tytułowej, jak to jest najłatwiejsza rzecz na świecie. Wtedy każdy czuje się głupio, gdy 20 wymaganych wstępnie założeń zostało zainstalowane, nie działa. Przyszłość programowania aplikacji sieciowych jest w rozsypce, jeśli w dzisiejszych czasach przewodzi javascript. Myślałem, że dni PHP były złe. lol /endRant

+5

Zgłoś błąd: https://github.com/yeoman/doctor/issues Prawdopodobnie nie wykryto poprawnie Twojej wersji NPM. Ponadto, wygląda na to, że 'yo' jest poprawnie zainstalowany, na podstawie tego wyjścia. Czy to nie działa? Wreszcie, będziesz miał o wiele lepszy czas w świecie Node.js, jeśli zignorujesz niektóre z hype BS, które ludzie próbowali dodać do niego. Node.js i NPM są właściwie całkiem solidnymi systemami, a rzeczy zgodne z prawdą są łatwe do zainstalowania. Ale jest wielu ludzi twierdzących, że to jest * droga, a prawda jest taka, że ​​sytuacja każdego jest trochę inna. – Brad

Odpowiedz

5

Pakiet yo nie wykrywa poprawnie wersji . Dane wyjściowe instalacji wskazują, że zostały poprawnie zainstalowane.

+0

Czy w zasadzie mówisz, że błąd dotyczący pakietu yo, który nie wykrył npm, jest prawdopodobnie tylko błędem pakietu yo i może zostać zignorowany? – user1338998

+0

@ user1338998 Tak. – gnerkus