angular-cli: AOT Build Errors with "Cannot read property 'transitiveModules' of undefined"
OS
macOS Sierra
Versions
angular-cli: 1.0.0-beta.18 node: 6.7.0 os: darwin x64
Repro steps
- Run
ng new angular2-temp
- Run
cd angular2-temp
- Run
ng build --aot
The log given by the failure
wlan-196-101:angular2-temp mprahl$ ng build --aot
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
0% compilingCannot read property 'transitiveModules' of undefined
TypeError: Cannot read property 'transitiveModules' of undefined
at /Users/mprahl/git/angular2-temp/node_modules/@angular/compiler/bundles/compiler.umd.js:13042:22
at Array.forEach (native)
at analyzeNgModules (/Users/mprahl/git/angular2-temp/node_modules/@angular/compiler/bundles/compiler.umd.js:13041:24)
at OfflineCompiler.compileModules (/Users/mprahl/git/angular2-temp/node_modules/@angular/compiler/bundles/compiler.umd.js:13115:20)
at CodeGenerator.codegen (/Users/iminar/Dev/angular/modules/@angular/compiler-cli/src/codegen.ts:71:26)
at AotPlugin._make (/Users/mprahl/git/angular2-temp/node_modules/@ngtools/webpack/src/plugin.js:186:43)
at Compiler.<anonymous> (/Users/mprahl/git/angular2-temp/node_modules/@ngtools/webpack/src/plugin.js:151:75)
at Compiler.applyPluginsParallel (/Users/mprahl/git/angular2-temp/node_modules/tapable/lib/Tapable.js:156:14)
at Compiler.<anonymous> (/Users/mprahl/git/angular2-temp/node_modules/webpack/lib/Compiler.js:463:8)
at Compiler.applyPluginsAsync (/Users/mprahl/git/angular2-temp/node_modules/tapable/lib/Tapable.js:73:70)
at Compiler.compile (/Users/mprahl/git/angular2-temp/node_modules/webpack/lib/Compiler.js:456:7)
at Compiler.<anonymous> (/Users/mprahl/git/angular2-temp/node_modules/webpack/lib/Compiler.js:219:10)
at Compiler.readRecords (/Users/mprahl/git/angular2-temp/node_modules/webpack/lib/Compiler.js:367:10)
at Compiler.<anonymous> (/Users/mprahl/git/angular2-temp/node_modules/webpack/lib/Compiler.js:216:9)
at next (/Users/mprahl/git/angular2-temp/node_modules/tapable/lib/Tapable.js:81:11)
at Compiler.<anonymous> (/Users/mprahl/git/angular2-temp/node_modules/webpack/lib/CachePlugin.js:34:58)
at Compiler.applyPluginsAsync (/Users/mprahl/git/angular2-temp/node_modules/tapable/lib/Tapable.js:85:13)
at Compiler.<anonymous> (/Users/mprahl/git/angular2-temp/node_modules/webpack/lib/Compiler.js:213:8)
at next (/Users/mprahl/git/angular2-temp/node_modules/tapable/lib/Tapable.js:81:11)
at Compiler.<anonymous> (/Users/mprahl/git/angular2-temp/node_modules/webpack/lib/node/NodeEnvironmentPlugin.js:23:3)
at Compiler.applyPluginsAsync (/Users/mprahl/git/angular2-temp/node_modules/tapable/lib/Tapable.js:85:13)
at Compiler.run (/Users/mprahl/git/angular2-temp/node_modules/webpack/lib/Compiler.js:210:7)
at /Users/mprahl/git/angular2-temp/node_modules/angular-cli/tasks/build-webpack.js:26:29
at Class.run (/Users/mprahl/git/angular2-temp/node_modules/angular-cli/tasks/build-webpack.js:25:16)
at Class.run (/Users/mprahl/git/angular2-temp/node_modules/angular-cli/commands/build.js:50:26)
at Class.<anonymous> (/Users/mprahl/git/angular2-temp/node_modules/angular-cli/lib/models/command.js:152:17)
at tryCatch (/Users/mprahl/git/angular2-temp/node_modules/rsvp/dist/lib/rsvp/-internal.js:215:12)
at invokeCallback (/Users/mprahl/git/angular2-temp/node_modules/rsvp/dist/lib/rsvp/-internal.js:230:13)
at publish (/Users/mprahl/git/angular2-temp/node_modules/rsvp/dist/lib/rsvp/-internal.js:198:7)
at flush (/Users/mprahl/git/angular2-temp/node_modules/rsvp/dist/lib/rsvp/asap.js:85:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 17 (5 by maintainers)
Commits related to this issue
- fix(compiler): update codegen API (#2919) Fixes #2917. — committed to angular/angular-cli by robwormald 8 years ago
@deebloo Thanks for the help.
The PR being referred to is: #2919
There was just a PR opened that should fix this. In the meantime pinning the versions of angular should work.
@mprahl try adding “@angular/compiler-cli”: “2.1.1” to you dev dependencies and fixing compiler to 2.1.1. that should work for now.