在mac上安装后无法运行aspnet

时间:2016-08-22 12:46:04

标签: asp.net .net macos asp.net-core .net-core

安装.net核心命令的最后一步之后。 “npm install -g generator-aspnet” 我仍然无法运行“yo asp net”命令

enter image description here

我搜索了很多。但没有找到任何解决方案,我不知道为什么我成功完成步骤后无法运行asp net项目创建。 我使用的是mac版本10.11.6

2 个答案:

答案 0 :(得分:1)

我认为你必须首先安装自己的人,然后再安装generator-aspnet所需的其他东西:

npm install -g yo
npm install -g bower
npm install -g generator-aspnet
yo aspnet

答案 1 :(得分:0)

Ahsans-MacBook-Pro:~ ahsanulhaq$ sudo npm -g install generator-aspnet
⸨░░░░░░░░░░░░░░░░░░⸩ ⠼ normalizeTree: sill install loadCurrentTree
⸨░░░░░░░░░░░░░░░░░░⸩ ⠋ normalizeTree: sill install loadCurrentTree
⸨    ░░░░░░░░░░░░░░⸩ ⠹ fetchMetadata: verb afterAdd /Users/ahsanulhaq
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2         or higher to avoid a RegExp DoS issue
/Users/ahsanulhaq/.npm-packages/lib
└── generator-aspnet@0.2.1 

Ahsans-MacBook-Pro:~ ahsanulhaq$ $ npm update minimatch
-bash: $: command not found
Ahsans-MacBook-Pro:~ ahsanulhaq$ npm update minimatch
Ahsans-MacBook-Pro:~ ahsanulhaq$ npm -v minimatch 3.10.3
Ahsans-MacBook-Pro:~ ahsanulhaq$ $ npm install -g npm@3 -bash: $:command not found
Ahsans-MacBook-Pro:~ ahsanulhaq$ npm install -g npm@3/Users/ahsanulhaq/.npm-packages/bin/npm -> /Users/ahsanulhaq/.npmpackages/lib/node_modules/npm/bin/npm-cli.js
/Users/ahsanulhaq/.npm-packages/lib
└── npm@3.10.6 

Ahsans-MacBook-Pro:~ ahsanulhaq$ $ npm install -g minimatch@3.0.2-bash: $: command not found
Ahsans-MacBook-Pro:~ ahsanulhaq$ npm install -g minimatch@3.0.2
/Users/ahsanulhaq/.npm-packages/lib
└─┬ minimatch@3.0.2 
  └─┬ brace-expansion@1.1.6 
    ├── balanced-match@0.4.2 
    └── concat-map@0.0.1 

Ahsans-MacBook-Pro:~ ahsanulhaq$ $ npm -v minimatch -bash: $: command not found
Ahsans-MacBook-Pro:~ ahsanulhaq$ npm -v minimatch 3.10.3
Ahsans-MacBook-Pro:~ ahsanulhaq$ yo aspnet -bash: yo: command not found
Ahsans-MacBook-Pro:~ ahsanulhaq$