Я нахожусь на Йосемите, с установленным Homebrew, Node и NPM.Установка Yeoman на Yosemite
Homebrew 0.9.5 Узел v0.12.3 NPM 2.9.1
По какой-то причине, я не могу получить Yeoman правильно установить. Установить, кажется, не идет нормально, без ошибок, но когда я проверяю, чтобы подтвердить установку оно не дает мне --version, и я не могу выполнить функцию йа ...
Gregs-MacBook-Pro:~ G$ npm install -g yo
/Users/G/npm/bin/yo -> /Users/G/npm/lib/node_modules/yo/lib/cli.js
> [email protected] postinstall /Users/G/npm/lib/node_modules/yo
> yodoctor
Yeoman Doctor
Running sanity checks on your system
✔ Global configuration file is valid
✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory
✔ NODE_PATH matches the npm root
Everything looks all right!
[email protected] /Users/G/npm/lib/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])
├── cr[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], [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] ([email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
Gregs-MacBook-Pro:~ G$ yo -v
-bash: yo: command not found
Я открыл. bashrc (нужно использовать sudo, чтобы открыть + сохранить его). Без sudo я не могу сохранить изменения.
sudo nano /.bashrc
Файл Bashrc гласит:
# NPM packages in homedir
NPM_PACKAGES="$HOME/.npm-packages"
# Tell our environment about user-installed node tools
PATH="$NPM_PACKAGES/bin:$PATH"
# Unset manpath so we can inherit from /etc/manpath via the `manpath` command
unset MANPATH # delete if you already modified MANPATH elsewhere in your configuration
MANPATH="$NPM_PACKAGES/share/man:$(manpath)"
# Tell Node about these packages
NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH"
Я попытался установить узел через Homebrew первый и узнал об этой проблеме, которую я не мог решить либо. https://gist.github.com/DanHerbert/9520689
С тех пор я не сдул все в терминале, включая узел, npm и homebrew.
Теперь я застрял, NPM позволяет мне установить пакеты чернового-CLI, беседку и YEOMAN, но в любое время я пытаюсь вызовом этих пакетов я получаю:
-bash: yo: command not found
Я предполагаю, что у него есть что-то . делать с содержимым /.bashrc, кто-нибудь помочь :(
В 'OS x' вы должны поставить на экспорт в' ~/.bash_profile', затем закройте и перезапустите «Терминал». –
Попытался добавить это в файл ~/.bash_profile и перезапустить. 'эхо экспорт PATH = \ "\ $ PATH \": ~/.node/бен >> ~/.bash_profile' не повезло:/ – gregbriandavis
В терминале попробуйте команду' которая yo' или 'какой yeoman', что-нибудь появляется? –