0
我正在使用angular-cli作爲我的項目。它在我的本地計算機上工作正常。但是當我試圖在服務器上運行我的代碼時,它顯示錯誤。angular2 ng生成顯示錯誤
在服務器git pull
後,我試圖npm install
它拋出我這些warns-
npm WARN prefer global [email protected] should be installed with -g
npm WARN cannot run in wd [email protected] typings install (wd=/var/www/BANBEIS/banbeis-client)
npm WARN unmet dependency /var/www/BANBEIS/banbeis-client/node_modules/angular-cli requires [email protected]'^1.3.1' but will load
npm WARN unmet dependency /var/www/BANBEIS/banbeis-client/node_modules/typings,
npm WARN unmet dependency which is version 0.8.1
然後,如果我ng build
它拋出我的錯誤 -
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
Build failed.
The Broccoli Plugin: [Funnel] failed with:
Error: ENOENT: no such file or directory, lstat 'typings'
at Error (native)
at Object.fs.lstatSync (fs.js:839:18)
at symlink (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/symlink-or-copy/index.js:60:26)
at symlinkOrCopySync (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/symlink-or-copy/index.js:55:5)
at /var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/broccoli-funnel/node_modules/broccoli-plugin/read_compat.js:58:9
at lib$rsvp$$internal$$tryCatch (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/broccoli-funnel/node_modules/broccoli-plugin/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/broccoli-funnel/node_modules/broccoli-plugin/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:1048:17)
at lib$rsvp$$internal$$publish (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/broccoli-funnel/node_modules/broccoli-plugin/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:1019:11)
at lib$rsvp$asap$$flush (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/broccoli-funnel/node_modules/broccoli-plugin/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:1198:9)
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)
The broccoli plugin was instantiated at:
at Funnel.Plugin (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/broccoli-funnel/node_modules/broccoli-plugin/index.js:7:31)
at new Funnel (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/broccoli-funnel/index.js:44:10)
at Angular2App._buildInputTree (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/lib/broccoli/angular2-app.js:85:7)
at new Angular2App (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/lib/broccoli/angular2-app.js:51:41)
at module.exports (/var/www/BANBEIS/banbeis-client/angular-cli-build.js:6:10)
at Class.module.exports.Task.extend.setupBroccoliBuilder (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/angular-cli/lib/models/builder.js:55:19)
at Class.module.exports.Task.extend.init (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/angular-cli/lib/models/builder.js:89:10)
at new Class (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/angular-cli/node_modules/core-object/core-object.js:18:12)
at Class.module.exports.Task.extend.run (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/angular-cli/lib/tasks/build.js:15:19)
at /var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/angular-cli/lib/commands/build.js:32:24
at lib$rsvp$$internal$$tryCatch (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1048:17)
at /var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:331:11
at lib$rsvp$asap$$flush (/var/www/BANBEIS/banbeis-client/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1198:9)
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)
這將是一個偉大的幫助我,如果有人在這件事情上幫助我。
看來,你缺少的分型目錄? –