Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AOT and 2.1.2 => Cannot read property 'transitiveModules' of undefined #2931

Closed
mmc41 opened this issue Oct 28, 2016 · 4 comments
Closed

AOT and 2.1.2 => Cannot read property 'transitiveModules' of undefined #2931

mmc41 opened this issue Oct 28, 2016 · 4 comments

Comments

@mmc41
Copy link

mmc41 commented Oct 28, 2016

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

MacOS 10.12.1

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.18
node: 7.0.0
os: darwin x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

Upgrade a project to newest 2.1.2 version of angular 2, v2.0.6 of typescript and v7.00 of nodejs.

ng build --prod --aot

The log given by the failure.

Normally this include a stack trace and some more information.

0% compilingCannot read property 'transitiveModules' of undefined TypeError: Cannot read property 'transitiveModules' of undefined at /Users/myuser/repos/myproject3/projects/client/node_modules/@angular/compiler/bundles/compiler.umd.js:13042:22 at Array.forEach (native) at analyzeNgModules (/Users/myuser/repos/myproject3/projects/client/node_modules/@angular/compiler/bundles/compiler.umd.js:13041:24) at OfflineCompiler.compileModules (/Users/myuser/repos/myproject3/projects/client/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/myuser/repos/myproject3/projects/client/node_modules/@ngtools/webpack/src/plugin.js:186:43) at Compiler.<anonymous> (/Users/myuser/repos/myproject3/projects/client/node_modules/@ngtools/webpack/src/plugin.js:151:75) at Compiler.applyPluginsParallel (/Users/myuser/repos/myproject3/projects/client/node_modules/tapable/lib/Tapable.js:156:14) at Compiler.<anonymous> (/Users/myuser/repos/myproject3/projects/client/node_modules/webpack/lib/Compiler.js:463:8) at Compiler.applyPluginsAsync (/Users/myuser/repos/myproject3/projects/client/node_modules/tapable/lib/Tapable.js:73:70) at Compiler.compile (/Users/myuser/repos/myproject3/projects/client/node_modules/webpack/lib/Compiler.js:456:7) at Compiler.<anonymous> (/Users/myuser/repos/myproject3/projects/client/node_modules/webpack/lib/Compiler.js:219:10) at Compiler.readRecords (/Users/myuser/repos/myproject3/projects/client/node_modules/webpack/lib/Compiler.js:367:10) at Compiler.<anonymous> (/Users/myuser/repos/myproject3/projects/client/node_modules/webpack/lib/Compiler.js:216:9) at next (/Users/myuser/repos/myproject3/projects/client/node_modules/tapable/lib/Tapable.js:81:11) at Compiler.<anonymous> (/Users/myuser/repos/myproject3/projects/client/node_modules/webpack/lib/CachePlugin.js:34:58) at Compiler.applyPluginsAsync (/Users/myuser/repos/myproject3/projects/client/node_modules/tapable/lib/Tapable.js:85:13) at Compiler.<anonymous> (/Users/myuser/repos/myproject3/projects/client/node_modules/webpack/lib/Compiler.js:213:8) at next (/Users/myuser/repos/myproject3/projects/client/node_modules/tapable/lib/Tapable.js:81:11) at Compiler.<anonymous> (/Users/myuser/repos/myproject3/projects/client/node_modules/webpack/lib/node/NodeEnvironmentPlugin.js:23:3) at Compiler.applyPluginsAsync (/Users/myuser/repos/myproject3/projects/client/node_modules/tapable/lib/Tapable.js:85:13) at Compiler.run (/Users/myuser/repos/myproject3/projects/client/node_modules/webpack/lib/Compiler.js:210:7) at /Users/myuser/repos/myproject3/projects/client/node_modules/angular-cli/tasks/build-webpack.js:26:29 at Class.run (/Users/myuser/repos/myproject3/projects/client/node_modules/angular-cli/tasks/build-webpack.js:25:16) at Class.run (/Users/myuser/repos/myproject3/projects/client/node_modules/angular-cli/commands/build.js:50:26) at Class.<anonymous> (/Users/myuser/repos/myproject3/projects/client/node_modules/angular-cli/lib/models/command.js:152:17) at tryCatch (/Users/myuser/repos/myproject3/projects/client/node_modules/rsvp/dist/lib/rsvp/-internal.js:215:12) at invokeCallback (/Users/myuser/repos/myproject3/projects/client/node_modules/rsvp/dist/lib/rsvp/-internal.js:230:13) at publish (/Users/myuser/repos/myproject3/projects/client/node_modules/rsvp/dist/lib/rsvp/-internal.js:198:7) at flush (/Users/myuser/repos/myproject3/projects/client/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)

@mmc41
Copy link
Author

mmc41 commented Oct 28, 2016

Here is my project.json:

{
  "name": "demo-project",
  "version": "0.0.0",
  "license": "MIT",
  "angular-cli": {},
  "scripts": {
    "start": "ng serve",
    "lint": "tslint \"src/**/*.ts\"",
    "test": "ng test",
    "buildprod": "ng build --prod --aot",
    "pree2e": "webdriver-manager update",
    "e2e": "protractor"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "2.1.2",
    "@angular/compiler": "2.1.2",
    "@angular/core": "2.1.2",
    "@angular/forms": "2.1.2",
    "@angular/http": "2.1.2",
    "@angular/platform-browser": "2.1.2",
    "@angular/platform-browser-dynamic": "2.1.2",
    "@angular/router": "3.1.2",
    "@types/lodash": "4.14.37",
    "ajv": "4.8.2",
    "angular-in-memory-web-api": "0.1.13",
    "core-js": "2.4.1",
    "lodash": "4.16.4",
    "rxjs": "5.0.0-beta.12",
    "ts-helpers": "1.1.2",
    "zone.js": "0.6.26"
  },
  "devDependencies": {
    "@types/jasmine": "2.5.36",
    "angular-cli": "1.0.0-beta.18",
    "codelyzer": "1.0.0-beta.3",
    "jasmine-core": "2.5.2",
    "jasmine-spec-reporter": "2.7.0",
    "karma": "1.3.0",
    "karma-chrome-launcher": "2.0.0",
    "karma-cli": "1.0.1",
    "karma-jasmine": "1.0.2",
    "karma-mocha-reporter": "2.2.0",
    "karma-remap-istanbul": "0.2.1",
    "protractor": "4.0.10",
    "ts-node": "1.6.1",
    "tslint": "3.15.1",
    "typescript": "2.0.6",
    "lite-server": "2.2.2"
  }
}

@sgybas
Copy link

sgybas commented Oct 28, 2016

@mmc41 This has already been reported as #2917

@hansl
Copy link
Contributor

hansl commented Oct 28, 2016

Dupe of #2917 . Closing.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants