0
在安裝新Homestead後,我遇到了訪問Yeoman的問題。在安裝過程中,npm install -g yo
和yo doctor
運行良好並在安裝過程中發現沒有問題,一切似乎都正常。但是,在安裝yeoman之後,yo: command not found
是我在虛擬機上收到的錯誤消息。未找到命令
[email protected]:~$ npm install -g yo
npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm
/home/vagrant/.node/bin/yo -> /home/vagrant/.node/lib/node_modules/yo/lib/cli.js
/home/vagrant/.node/bin/yo-complete -> /home/vagrant/.node/lib/node_modules/yo/lib/completion/index.js
> [email protected] postinstall /home/vagrant/.node/lib/node_modules/yo/node_modules/spawn-sync
> node postinstall
> [email protected] postinstall /home/vagrant/.node/lib/node_modules/yo
> yodoctor
Yeoman Doctor
Running sanity checks on your system
✔ Global configuration file is valid
✔ Node.js version
✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory
✔ npm version
✔ NODE_PATH matches the npm root
Everything looks all right!
/home/vagrant/.node/lib
└─┬ [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
[[REMOVED FOR READABILITY]]
└─┬ [email protected]
├── [email protected]
├── [email protected]
├─┬ tak[email protected]
│ ├── [email protected]
│ └── [email protected]
└── [email protected]
[email protected]:~$ yo
yo: command not found
我在~/.bashrc
路徑說以下內容:PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/home/vagrant/.node/lib
還有什麼是我在這裏失蹤,可能會造成這個?
你嘗試添加'/ home/vagrant/.node/bin'到路徑嗎? – ldg
@ldg:就是這樣!如果你想回答我的問題,我會給你答案。感謝您指出;我失去了我的彈珠。 –