我正在学习如何将Angular CLI应用程序部署到Heroku,但是在尝试远程推送到Heroku时遇到了一个错误。
得到以下内容:
> testas@0.0.0 postinstall /tmp/build_96f718bcbe906771d313a2db03fa7405
remote: > ng build && mv dist/* .
remote:
remote: Could not start watchman; falling back to NodeWatcher for file system events.
remote: Visit http://ember-cli.com/user-guide/#watchman for more info.
remote: Build failed.
remote: The Broccoli Plugin: [Funnel] failed with:
remote: Error: ENOENT: no such file or directory, lstat 'typings'
remote: at Error (native)
remote: at Object.fs.lstatSync (fs.js:887:18)
remote: at symlink (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/symlink-or-copy/index.js:60:26)
remote: at symlinkOrCopySync (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/symlink-or-copy/index.js:55:5)
remote: at /tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/broccoli-plugin/read_compat.js:58:9
remote: at lib$rsvp$$internal$$tryCatch (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1036:16)
remote: at lib$rsvp$$internal$$invokeCallback (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1048:17)
remote: at lib$rsvp$$internal$$publish (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1019:11)
remote: at lib$rsvp$asap$$flush (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1198:9)
remote: at _combinedTickCallback (internal/process/next_tick.js:67:7)
remote: at process._tickCallback (internal/process/next_tick.js:98:9)
remote:
remote: The broccoli plugin was instantiated at:
remote: at Funnel.Plugin (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/broccoli-plugin/index.js:10:31)
remote: at new Funnel (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/broccoli-funnel/index.js:44:10)
remote: at Angular2App._buildInputTree (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/lib/broccoli/angular2-app.js:93:7)
remote: at new Angular2App (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/lib/broccoli/angular2-app.js:51:41)
remote: at module.exports (/tmp/build_96f718bcbe906771d313a2db03fa7405/angular-cli-build.js:10:10)
remote: at Class.module.exports.Task.extend.setupBroccoliBuilder (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/angular-cli/lib/models/builder.js:55:19)
remote: at Class.module.exports.Task.extend.init (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/angular-cli/lib/models/builder.js:89:10)
remote: at new Class (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/core-object/core-object.js:18:12)
remote: at Class.module.exports.Task.extend.run (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/angular-cli/lib/tasks/build.js:15:19)
remote: at /tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/angular-cli/lib/commands/build.js:32:24
remote: at lib$rsvp$$internal$$tryCatch (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1036:16)
remote: at lib$rsvp$$internal$$invokeCallback (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1048:17)
remote: at /tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:331:11
remote: at lib$rsvp$asap$$flush (/tmp/build_96f718bcbe906771d313a2db03fa7405/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1198:9)
remote: at _combinedTickCallback (internal/process/next_tick.js:67:7)
remote: at process._tickCallback (internal/process/next_tick.js:98:9)
尝试如下:
npm uninstall -g angular-cli
npm install -g angular-cli@webpack