“ng new app”会创建项目,但会出现一些错误

时间:2017-03-05 09:08:41

标签: angular angular-cli

在运行ng new app时,我的带有角度文件和文件夹的应用程序目录似乎已创建,但我在下面分享了一个堆栈:

$ ng new music
installing ng
  create .editorconfig
  create README.md
  create src\app\app.component.css
  create src\app\app.component.html
  create src\app\app.component.spec.ts
  create src\app\app.component.ts
  create src\app\app.module.ts
  create src\assets\.gitkeep
  create src\environments\environment.prod.ts
  create src\environments\environment.ts
  create src\favicon.ico
  create src\index.html
  create src\main.ts
  create src\polyfills.ts
  create src\styles.css
  create src\test.ts
  create src\tsconfig.app.json
  create src\tsconfig.spec.json
  create src\typings.d.ts
  create .angular-cli.json
  create e2e\app.e2e-spec.ts
  create e2e\app.po.ts
  create e2e\tsconfig.e2e.json
  create .gitignore
  create karma.conf.js
  create package.json
  create protractor.conf.js
  create tsconfig.json
  create tslint.json
Installing packages for tooling via npm.
spawn UNKNOWN
Error: spawn UNKNOWN
    at exports._errnoException (util.js:1022:11)
    at ChildProcess.spawn (internal/child_process.js:313:11)
    at exports.spawn (child_process.js:380:9)
    at Object.exports.execFile (child_process.js:143:15)
    at Object.exports.exec (child_process.js:103:18)
    at C:\Users\user\AppData\Roaming\npm\node_modules\@angular\cli\tasks\npm-install.js:15:29
    at Class.run (C:\Users\user\AppData\Roaming\npm\node_modules\@angular\cli\tasks\npm-install.js:13:16)
    at C:\Users\user\AppData\Roaming\npm\node_modules\@angular\cli\tasks\init.js:83:35
    at tryCatch (C:\Users\user\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rsvp\dist\rsvp.js:538:12)
    at invokeCallback (C:\Users\user\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rsvp\dist\rsvp.js:553:13)
    at publish (C:\Users\user\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rsvp\dist\rsvp.js:521:7)
    at flush (C:\Users\user\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rsvp\dist\rsvp.js:2373:5)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

我无法弄清楚为什么会这样。该项目似乎没有任何问题,但为什么会出现此错误。

版本:

@angular/cli: 1.0.0-rc.1
node: 6.9.5
npm: 3.10.10
os: win32 x64

1 个答案:

答案 0 :(得分:0)

不再支持angular-cli使用@ angular / cli代替:

x = tf.placeholder(tf.float32, [None, 227, 227, 3])