我正在尝试为Angular项目配置Azure CI / CD
Package.json
Build Project引发以下错误:
2019-05-20T09:19:18.0252202Z > ng build
2019-05-20T09:19:18.0252697Z ^
2019-05-20T09:19:18.0253091Z
2019-05-20T09:19:18.0253456Z
2019-05-20T09:19:18.0254242Z Error: Cannot find module '../internal/operators/audit'
2019-05-20T09:19:18.0254971Z at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
2019-05-20T09:19:18.0255650Z at Function.Module._load (internal/modules/cjs/loader.js:508:25)
2019-05-20T09:19:18.0256280Z at Module.require (internal/modules/cjs/loader.js:637:17)
2019-05-20T09:19:18.0257011Z at require (internal/modules/cjs/helpers.js:22:18)
2019-05-20T09:19:18.0257814Z at Object.<anonymous> (D:\a\1\s\IoTConnectAI\node_modules\@angular-devkit\schematics\node_modules\rxjs\operators\index.js:3:15)
2019-05-20T09:19:18.0258514Z at Module._compile (internal/modules/cjs/loader.js:701:30)
2019-05-20T09:19:18.0259140Z at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
2019-05-20T09:19:18.0259776Z at Module.load (internal/modules/cjs/loader.js:600:32)
2019-05-20T09:19:18.0260390Z at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
2019-05-20T09:19:18.0264689Z at Function.Module._load (internal/modules/cjs/loader.js:531:3)
2019-05-20T09:19:18.0265336Z npm ERR! code ELIFECYCLE
2019-05-20T09:19:18.0265959Z npm ERR! errno 1
2019-05-20T09:19:18.0266569Z npm ERR! sconnectai@0.0.0 build: `ng build`
2019-05-20T09:19:18.0267438Z npm ERR! Exit status 1
2019-05-20T09:19:18.0268063Z npm ERR!
2019-05-20T09:19:18.0268686Z npm ERR! Failed at the sconnectai@0.0.0 build script.
2019-05-20T09:19:18.0270422Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-05-20T09:19:18.0271137Z
尝试了 ng build --prod
请帮助我解决此问题
答案 0 :(得分:0)
代替运行构建,将其更改为
ng build --prod
https://slides.com/sajeetharansinnathurai/angular-continuous-integration#/13
答案 1 :(得分:0)