我正在尝试使用Yosemite操作系统的Macbook电脑开发与ASP.NET相关的应用程序。
我已经使用以下命令通过Homebrew获取了DNVM
:
brew tap aspnet/dnx
brew update
brew install dnvm
我还使用以下命令设置了ASP.NET生成器:
npm install -g yo generator-aspnet
npm install -g bower grunt-cli gulp-cli
此时,一切都应该准备就绪。但是,当我在终端中输入
yo aspnet
时,它会生成一个错误,指出-bash: yo: command not found
。这是什么原因,是否有简单的解决方法?我参考了多个资源,其中最好的两个如下:
参考_01:https://code.visualstudio.com/docs/aspnet5
参考_02:http://tattoocoder.azurewebsites.net/vscode-creating-an-application-with-yeoman-aspnet-generators/ 更新 我确保已安装以下内容,但仍无法识别
yo aspnet
- node.js:
brew install node
- Yeoman:
npm install -g yo
- 安装:
npm install -g generator-aspnet
- 运行:
yo aspnet