Repository navigation
Build fails in --prod mode #8615
Copy link
Copy link
Closed
Labels
needs: investigationRequires some digging to determine if action is neededRequires some digging to determine if action is needed
Description
Versions
$ ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 1.5.4 (e)
Node: 9.2.0
OS: linux x64
Angular: 5.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.5.4
@angular-devkit/build-optimizer: 0.0.33
@angular-devkit/core: 0.0.21
@angular-devkit/schematics: 0.0.37
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.4
@schematics/angular: 0.1.7
typescript-extends: 1.0.1
typescript: 2.4.2
webpack-concat-plugin: 1.4.0
webpack-dev-server: 2.9.4
webpack: 3.8.1
Repro steps
- Clone testing-2 branch from here: https://github.com/darkbasic/angularcli-meteor/tree/testing-2
- npm install && npm run start-prod
- In alternative set
ejectedto false in.angular-cli.jsonand runng serve --prod
Observed behavior
ERROR in ./node_modules/rxjs/observable/BoundNodeCallbackObservable.js
Module build failed: TypeError: Cannot read property 'type' of undefined
at Object.getEffectiveTypeAnnotationNode (/home/niko/WebstormProjects/angularcli-meteor/node_modules/typescript/lib/typescript.js:9341:18)
at assignContextualParameterTypes (/home/niko/WebstormProjects/angularcli-meteor/node_modules/typescript/lib/typescript.js:41652:25)
at checkFunctionExpressionOrObjectLiteralMethod (/home/niko/WebstormProjects/angularcli-meteor/node_modules/typescript/lib/typescript.js:41948:29)
at checkExpressionWorker (/home/niko/WebstormProjects/angularcli-meteor/node_modules/typescript/lib/typescript.js:42959:28)
at checkExpression (/home/niko/WebstormProjects/angularcli-meteor/node_modules/typescript/lib/typescript.js:42898:42)
at checkExpressionCached (/home/niko/WebstormProjects/angularcli-meteor/node_modules/typescript/lib/typescript.js:42779:38)
at checkReturnStatement (/home/niko/WebstormProjects/angularcli-meteor/node_modules/typescript/lib/typescript.js:45418:54)
at checkSourceElement (/home/niko/WebstormProjects/angularcli-meteor/node_modules/typescript/lib/typescript.js:46763:28)
at Object.forEach (/home/niko/WebstormProjects/angularcli-meteor/node_modules/typescript/lib/typescript.js:1506:30)
at checkBlock (/home/niko/WebstormProjects/angularcli-meteor/node_modules/typescript/lib/typescript.js:44563:16)
at checkSourceElement (/home/niko/WebstormProjects/angularcli-meteor/node_modules/typescript/lib/typescript.js:46742:28)
at checkFunctionExpressionOrObjectLiteralMethodDeferred (/home/niko/WebstormProjects/angularcli-meteor/node_modules/typescript/lib/typescript.js:41990:21)
at checkDeferredNodes (/home/niko/WebstormProjects/angularcli-meteor/node_modules/typescript/lib/typescript.js:46828:25)
at checkSourceFileWorker (/home/niko/WebstormProjects/angularcli-meteor/node_modules/typescript/lib/typescript.js:46863:17)
at checkSourceFile (/home/niko/WebstormProjects/angularcli-meteor/node_modules/typescript/lib/typescript.js:46842:13)
at Object.forEach (/home/niko/WebstormProjects/angularcli-meteor/node_modules/typescript/lib/typescript.js:1506:30)
@ ./node_modules/rxjs/observable/bindNodeCallback.js 2:36-76
@ ./node_modules/rxjs/add/observable/bindNodeCallback.js
@ ./node_modules/rxjs/Rx.js
@ ./node_modules/meteor-rxjs/dist/ObservableCollection.js
@ ./node_modules/meteor-rxjs/dist/index.js
@ ./api/server/collections/chats.ts
@ ./api/server/collections/index.ts
@ ./src/app/app.component.ts
@ ./src/app/app.module.ngfactory.js
@ ./src/main.ts
@ multi (webpack)-dev-server/client?http://localhost:4200 ./src/main.ts
Desired behavior
Should compile the code. Older versions of angular-cli did work fine. See the master branch here which uses 1.4.7: https://github.com/darkbasic/angularcli-meteor
Mention any other details that might be useful (optional)
The code works fine without --prod.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs: investigationRequires some digging to determine if action is neededRequires some digging to determine if action is needed
Activity
iursevla commentedon Nov 23, 2017
Same issue but using
BehaviorSubjectjasperbosch commentedon Nov 24, 2017
I noticed that in the folder 'node_modules@angular-devkit\build-optimizer' there was no 'node_modules' folder.
When copying that folder from an other project my 'ng build --prod' succeeds.
Maybe this helps in solving the problem.
filipesilva commentedon Nov 25, 2017
This issue is a duplicate of #8615 I believe, and should be fixed when angular/devkit#299 is merged.
angular-automatic-lock-bot commentedon Sep 7, 2019
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.