Skip to content

AOT build error Cannot read property 'kind' of undefined #8434

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

Closed
samalexander opened this issue Nov 10, 2017 · 63 comments · Fixed by #9225
Closed

AOT build error Cannot read property 'kind' of undefined #8434

samalexander opened this issue Nov 10, 2017 · 63 comments · Fixed by #9225
Assignees
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity3: broken

Comments

@samalexander
Copy link

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

Angular CLI: 1.5.0
Node: 8.5.0
OS: darwin x64
Angular: 5.0.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cdk: 5.0.0-rc0
@angular/cli: 1.5.0
@angular/flex-layout: 2.0.0-beta.10-4905443
@angular/material: 5.0.0-rc0
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.2
typescript: 2.4.2
webpack-bundle-analyzer: 2.9.1
webpack: 3.8.1

Repro steps.

rm -rf node_modules/
yarn add @angular/cli@latest -D
ng build --aot

The log given by the failure.

ERROR in Error: TypeError: Cannot read property 'kind' of undefined at nodeCanBeDecorated (/Users/sam/Developer/ng-prime/node_modules/typescript/lib/typescript.js:7805:35) at nodeIsDecorated (/Users/sam/Developer/ng-prime/node_modules/typescript/lib/typescript.js:7825:16) at Object.nodeOrChildIsDecorated (/Users/sam/Developer/ng-prime/node_modules/typescript/lib/typescript.js:7829:16) at isDecoratedClassElement (/Users/sam/Developer/ng-prime/node_modules/typescript/lib/typescript.js:51668:23) at isInstanceDecoratedClassElement (/Users/sam/Developer/ng-prime/node_modules/typescript/lib/typescript.js:51659:20) at Object.filter (/Users/sam/Developer/ng-prime/node_modules/typescript/lib/typescript.js:1652:25) at getDecoratedClassElements (/Users/sam/Developer/ng-prime/node_modules/typescript/lib/typescript.js:51641:23) at generateClassElementDecorationExpressions (/Users/sam/Developer/ng-prime/node_modules/typescript/lib/typescript.js:51815:27) at addClassElementDecorationStatements (/Users/sam/Developer/ng-prime/node_modules/typescript/lib/typescript.js:51804:44) at visitClassDeclaration (/Users/sam/Developer/ng-prime/node_modules/typescript/lib/typescript.js:51131:13) at visitTypeScript (/Users/sam/Developer/ng-prime/node_modules/typescript/lib/typescript.js:50972:28) at visitorWorker (/Users/sam/Developer/ng-prime/node_modules/typescript/lib/typescript.js:50785:24) at sourceElementVisitorWorker (/Users/sam/Developer/ng-prime/node_modules/typescript/lib/typescript.js:50817:28) at saveStateAndInvoke (/Users/sam/Developer/ng-prime/node_modules/typescript/lib/typescript.js:50738:27) at sourceElementVisitor (/Users/sam/Developer/ng-prime/node_modules/typescript/lib/typescript.js:50799:20) at visitNodes (/Users/sam/Developer/ng-prime/node_modules/typescript/lib/typescript.js:49280:48)

Desired functionality.

AOT build should be successful

Mention any other details that might be useful.

The project built fine with AOT enabled with CLI v1.4.9

@DavidDNA
Copy link

Same issue here with @angular/cli 1.5.0

Works without aot.

@Brocco Brocco added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity3: broken labels Nov 14, 2017
@Axure
Copy link

Axure commented Nov 15, 2017

Same here, except that it does not work either without AOT. Without AOT, it takes over 140 seconds to build, and throws the following error when actually running:

main.eed5882cd957c35b82be.bundle.js:1 Uncaught Error: Unexpected value 'e' imported by the module 'e'. Please add a @NgModule annotation.
    at c (main.eed5882cd957c35b82be.bundle.js:1)
    at main.eed5882cd957c35b82be.bundle.js:1
    at Array.forEach (<anonymous>)
    at e.getNgModuleMetadata (main.eed5882cd957c35b82be.bundle.js:1)
    at e._loadModules (main.eed5882cd957c35b82be.bundle.js:1)
    at e._compileModuleAndComponents (main.eed5882cd957c35b82be.bundle.js:1)
    at e.compileModuleAsync (main.eed5882cd957c35b82be.bundle.js:1)
    at e.compileModuleAsync (main.eed5882cd957c35b82be.bundle.js:1)
    at e.bootstrapModule (main.eed5882cd957c35b82be.bundle.js:1)
    at Object.cDNt (main.eed5882cd957c35b82be.bundle.js:1)

@samalexander
Copy link
Author

@Axure it builds successfully for me with ng build --prod --aot=false

@Axure
Copy link

Axure commented Nov 15, 2017

I seem to have found out the problem. The problematic code there is:

        switch (node.kind) {
            case 229 /* ClassDeclaration */:
                // classes are valid targets
                return true;
            case 149 /* PropertyDeclaration */:
                // property declarations are valid if their parent is a class declaration.
                return node.parent.kind === 229 /* ClassDeclaration */;

It seems to fail to find the parent of the node when the node is a property declaration. I suddenly realized that it was the @select decorator from angular-redux, and I'm pretty sure the decorator is valid. So I tried adding the following line to bypass the check.
if (!node.parent) return true;
And it turns out to be working.

@arsyed04
Copy link

arsyed04 commented Nov 19, 2017

Facing this issue with Angular Cli 1.5.2
Works fine with 1.5.0

Angular Version: 1.5.2

@cerebroo
Copy link

cerebroo commented Nov 20, 2017

@arsyed04 - Yup was getting error with Angular Cli 1.5.2 but worked fine when rolled back to 1.5.0
Thanks.

Not sure if it's really needed but my TypeScript version was 2.6.1

@arsyed04
Copy link

My typescript version is also same "typescript": "^2.6.1"

@elvisbegovic
Copy link
Contributor

same error and my version is "typescript": "~2.4.2"

@billcheng
Copy link

Same error with cli 1.5.2. Downgraded to 1.5.0 and it worked.

@angular/cli: 1.5.2
@angular/xxxx: 5.0.2
typescript: 2.4.2

ERROR in Error: TypeError: Cannot read property 'kind' of undefined
    at nodeCanBeDecorated (/Users/cchen6/Desktop/Codes/barter/angular-sell-contract-ui/node_modules/typescript/lib/typescript.js:7805:35)
    at nodeIsDecorated (/Users/cchen6/Desktop/Codes/barter/angular-sell-contract-ui/node_modules/typescript/lib/typescript.js:7825:16)
    at Object.nodeOrChildIsDecorated (/Users/cchen6/Desktop/Codes/barter/angular-sell-contract-ui/node_modules/typescript/lib/typescript.js:7829:16)
    at isDecoratedClassElement (/Users/cchen6/Desktop/Codes/barter/angular-sell-contract-ui/node_modules/typescript/lib/typescript.js:51668:23)
    at isInstanceDecoratedClassElement (/Users/cchen6/Desktop/Codes/barter/angular-sell-contract-ui/node_modules/typescript/lib/typescript.js:51659:20)
    at Object.filter (/Users/cchen6/Desktop/Codes/barter/angular-sell-contract-ui/node_modules/typescript/lib/typescript.js:1652:25)
    at getDecoratedClassElements (/Users/cchen6/Desktop/Codes/barter/angular-sell-contract-ui/node_modules/typescript/lib/typescript.js:51641:23)
    at generateClassElementDecorationExpressions (/Users/cchen6/Desktop/Codes/barter/angular-sell-contract-ui/node_modules/typescript/lib/typescript.js:51815:27)
    at addClassElementDecorationStatements (/Users/cchen6/Desktop/Codes/barter/angular-sell-contract-ui/node_modules/typescript/lib/typescript.js:51804:44)
    at visitClassDeclaration (/Users/cchen6/Desktop/Codes/barter/angular-sell-contract-ui/node_modules/typescript/lib/typescript.js:51131:13)
    at visitTypeScript (/Users/cchen6/Desktop/Codes/barter/angular-sell-contract-ui/node_modules/typescript/lib/typescript.js:50972:28)
    at visitorWorker (/Users/cchen6/Desktop/Codes/barter/angular-sell-contract-ui/node_modules/typescript/lib/typescript.js:50785:24)
    at sourceElementVisitorWorker (/Users/cchen6/Desktop/Codes/barter/angular-sell-contract-ui/node_modules/typescript/lib/typescript.js:50817:28)
    at saveStateAndInvoke (/Users/cchen6/Desktop/Codes/barter/angular-sell-contract-ui/node_modules/typescript/lib/typescript.js:50738:27)
    at sourceElementVisitor (/Users/cchen6/Desktop/Codes/barter/angular-sell-contract-ui/node_modules/typescript/lib/typescript.js:50799:20)
    at visitNodes (/Users/cchen6/Desktop/Codes/barter/angular-sell-contract-ui/node_modules/typescript/lib/typescript.js:49280:48)

@danielsogl
Copy link
Contributor

Im having the same error since I use the md-bootstrap project.

@1forh
Copy link

1forh commented Nov 21, 2017

Getting same error.

@angular/angular-cli 1.5.3
@angular/core 5.0.2
typescript 2.6.1

Running: ng build --prod --aot

Produces:

ERROR in Error: TypeError: Cannot read property 'kind' of undefined
    at nodeCanBeDecorated (/path-to-site/node_modules/typescript/lib/typescript.js:8350:36)
    at nodeIsDecorated (/path-to-site/node_modules/typescript/lib/typescript.js:8364:16)
    at nodeOrChildIsDecorated (/path-to-site/node_modules/typescript/lib/typescript.js:8368:16)
    at Object.forEach (/path-to-site/node_modules/typescript/lib/typescript.js:1521:30)
    at Object.childIsDecorated (/path-to-site/node_modules/typescript/lib/typescript.js:8374:27)
    at getClassFacts (/path-to-site/node_modules/typescript/lib/typescript.js:52945:20)
    at visitClassDeclaration (/path-to-site/node_modules/typescript/lib/typescript.js:52970:25)
    at visitTypeScript (/path-to-site/node_modules/typescript/lib/typescript.js:52828:28)
    at visitorWorker (/path-to-site/node_modules/typescript/lib/typescript.js:52624:24)
    at sourceElementVisitorWorker (/path-to-site/node_modules/typescript/lib/typescript.js:52653:28)
    at saveStateAndInvoke (/path-to-site/node_modules/typescript/lib/typescript.js:52568:27)
    at sourceElementVisitor (/path-to-site/node_modules/typescript/lib/typescript.js:52638:20)
    at visitNodes (/path-to-site/node_modules/typescript/lib/typescript.js:50937:48)
    at Object.visitLexicalEnvironment (/path-to-site/node_modules/typescript/lib/typescript.js:50970:22)
    at visitSourceFile (/path-to-site/node_modules/typescript/lib/typescript.js:52915:53)
    at saveStateAndInvoke (/path-to-site/node_modules/typescript/lib/typescript.js:52568:27)

Edit: I've also narrowed it down to a specific decorator I'm using throughout my app. Removing the instances of the @Throttle() decorator (from lodash-decorators) from my app "fixes" my issue.

@akartynnik
Copy link

akartynnik commented Nov 21, 2017

Same error.

@angular/angular-cli 1.5.0
@angular/core 5.0.2
typescript 2.6.1

Running: ng build --aot

@elvisbegovic
Copy link
Contributor

elvisbegovic commented Nov 23, 2017

I confirm erro still here with last release 1.5.4 / 1.6.0-rc.0 :

Angular CLI: 1.6.0-rc.0
Node: 8.9.1
OS: win32 x64
Angular: 5.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.6.0-rc.0
@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.9.0-rc.0
@schematics/angular: 0.1.7
typescript: 2.4.2
webpack: 3.8.1

ps: I tried with ts 2.5.3 and with ng serve it works but with --aot or ng build it throw this error

@niveo please fix your links when click ??

@niveo
Copy link

niveo commented Nov 23, 2017

@bvoisin
Copy link

bvoisin commented Nov 23, 2017

In my case, the error was caused by arrow functions used as parameters of decorators.
IE : @someAnnotation(t=>!!t) someField; for example
To find them, use a Regexp search or add a console.log in the typescript.js file before re-compiling :

 case 149 /* PropertyDeclaration */:
              if (!node.parent) {    
                console.log("###### No Node parent on " + node.name.escapedText);
            }
                // property declarations are valid if their parent is a class declaration.
                return node.parent.kind === 229 /* ClassDeclaration */;

Then it was easy to replace those with named function

function someFn(t) {
   return !!t;
}
[...]
@someAnnotation(someFn) someField; 

@akartynnik
Copy link

Huge THANK YOU! You are save my time :)

@ericmarcos
Copy link

I'm having the same problem and found it's because of arrow functions in decorators, like:

@Type(() => Message)

When I change the above to:

function m() { return Message; }
@Type(m)

It compiles with AOT again =)

@niveo
Copy link

niveo commented Nov 28, 2017

typestack/class-transformer#108

@rmrevin

export function serializeType<T>(object: T) {
  return function () { return object; }
}

export class CatalogItem {

  id: string;

  @Type(serializeType(CatalogCategory))
  category?: CatalogCategory = null;

  @Type(serializeType(PackingVariant))
  packing: PackingVariant;

  price: string = null;

}

@seangwright
Copy link
Contributor

Angular CLI: 1.5.4
Node: 8.9.1
OS: win32 x64
Angular: 5.0.3

I'm having an issue with a @Debounce decorator.

Using the above console.log() in typescript.ts I get ###### No Node parent on onWindowChange for case 151

export function Debounce(delay: number = 300): MethodDecorator {
  return function (
    _target: any,
    _propertyKey: string,
    descriptor: PropertyDescriptor
  ) {
    let timeout: any = null;

    const original = descriptor.value;

    descriptor.value = function (...args: any[]) {
      clearTimeout(timeout);
      timeout = setTimeout(() => original.apply(this, args), delay);
    };

    return descriptor;
  };
}
  ...
  // inside component class ...
  @HostListener('window:orientationChange', [])
  @HostListener('window:resize', [])
  @Debounce()
  onWindowChange() { ... }

Replacing the decorator with the timeout code in onWindowChange() fixes the issue.

@MohammedYaseen
Copy link

@Axure

I use @select decorator from angular-redux, locally i can run the app without any problems, however when i try to build it in prod i get the same error above. I don't want to edit the typescript.js file manually to bypass the check. any suggestions ???

@Axure
Copy link

Axure commented Dec 1, 2017

@MohammedYaseen I'm not sure, but probably using a custom github repo as registry for the dependency typescript in package.json would work. See this for example.

@MohammedYaseen
Copy link

@Axure, Ok, thanks

@hccampos
Copy link

hccampos commented Dec 5, 2017

We are having the same problem and have been stuck on 1.5.0 because of it. In our case it happens even without arrow functions being passed to decorators

The cause in our case is some decorators being applied to properties that also have Angular decorators (usually @input) applied to them. Everything works in JIT mode but AOT fails. Stepping through in the debugger we can see that the node's parent is gone and there is no null check to prevent it exploding (as mentioned above by another commenter).

We will probably end up removing the custom decorators anyway (can't rely on decorators at all), but until then, we are stuck or will have to hack Typescript.

Any news on whether this is being looked at? Would a PR to Typescript or the CLI be acceptable?

@hccampos
Copy link

hccampos commented Dec 5, 2017

@el-davo
Copy link

el-davo commented Dec 5, 2017

In my case it turned out to be the fact that we were using 2 decorators on a function Our code was like this, which should work and is valid

@HostListener('document:keydown.escape', ['$event'])
@dispatch()
onKeydownHandler() {
      return this.actions.hideOverlay();
}

Changing to below got rid of the error

@HostListener('document:keydown.escape', ['$event'])
onKeydownHandler() {
    this.hideOverlay();
}

@dispatch()
hideOverlay() {
   return this.actions.hideOverlay();
}

@arsyed04
Copy link

@philjones88 where did you apply this workaround? Is it general fix?

@philjones88
Copy link

@arsyed04 I applied it to any usages of @Type(() => MyType) from the class-transformer library I had in my application

@felipefialho
Copy link

Same issue with "@angular/cli": "^1.6.8"

@sparvov
Copy link

sparvov commented Feb 12, 2018

issue with md-bootstrap is fixed with typescript 2.7.1

dkocich added a commit to dkocich/osm-pt-ngx-leaflet that referenced this issue Feb 26, 2018
dkocich added a commit to dkocich/osm-pt-ngx-leaflet that referenced this issue Feb 26, 2018
dkocich added a commit to dkocich/osm-pt-ngx-leaflet that referenced this issue Feb 27, 2018
@andrea-spotsoftware
Copy link

@morganster this issue is about --aot compilation

@front-end-developer
Copy link

It still broken
angular cli: 1.7.4
angular version: 5.2.10
typescript: 2.8.3
webpack: 3.11.0

it is not possible to build with: ng build --prod
still breaks with:
TypeError: Cannot read property 'kind' of undefined

@kevinbuhmann
Copy link
Contributor

kevinbuhmann commented Apr 23, 2018

@front-end-developer: TypeScript 2.8.x is not yet supported. Please install a version that matches the Angular compiler's peer dependency: https://github.com/angular/angular/blob/5.2.10/packages/compiler-cli/package.json#L18

@front-end-developer
Copy link

front-end-developer commented Apr 23, 2018

Thanks for this, now I ran:
npm install typescript@'>=2.4.2 <2.7'

it installed:
"typescript": "^2.6.2"

when i run ng build --prod:
because I saw errors about:
Function calls are not supported in decorators but 'ɵmakeDecorator' was called in 'Component'
'Component' calls 'ɵmakeDecorator'

I changed it to: 2.7.0-rc
that fixed it.

Then i run ng build --prod:
Now it cries:
ERROR in Cannot read property 'kind' of undefined
searched all day to fix that error: but never found a solution has anybody ever found a solution this this error?

  1. anyone knows what version of node is recommended for Angular 5.2.10?
    my nvm lists has:
    8.9.4, 8.9.0, 7.6.0 & 7.10.1

@front-end-developer
Copy link

So this fix worked for me:
I was using nvm (node version manager) and switching between node versions to find the solutions,
you have to select the right version of node, I have 64bit version and node-sass was asking for 32bit version.

I had to do: npm rebuild node-sass
but then after a build I had that error, during node-sass rebuild I noticed it was saying it could not find python 2.

So I ran the command from powershell as administrator:
npm --add-python-to-path='true' --debug install --global windows-build-tools
npm install --global node-gyp

then I switch to a 32 bit node version:
nvm use 7.x.x 32

you can check your nvm version with the command:
nvm list
7.6.0 (Currently using 32-bit executable)

So that fixed that, then I ran:
npm rebuild node-sass

then tried to find a compatible typescript version that would not torment my production build:
"typescript": "^2.6.2"

that fixed my issues.

@front-end-developer
Copy link

so the only error I am seeing now is:
Function calls are not supported in decorators but 'ɵmakeDecorator' was called in 'Component'
'Component' calls 'ɵmakeDecorator'

but this is manageable.

@juninhocruzg3
Copy link

I had same problem today.

TypeError: Cannot read property 'kind' of undefined (...)

...and I fix it just upgrading my Typescript for 2.6.2.

@rodrigowindows
Copy link

These steps worked for me:
1)Clear package.json with the importat packages for example I have delete my package and insert one by one here is my

{
  "name": "test-app",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^6.1.0",
    "@angular/cdk": "^6.4.2",
    "@angular/common": "^6.1.0",
    "@angular/compiler": "^6.1.0",
    "@angular/core": "^6.1.0",
    "@angular/flex-layout": "^6.0.0-beta.17",
    "@angular/forms": "^6.1.0",
    "@angular/http": "^6.1.0",
    "@angular/material": "^6.4.2",
    "@angular/platform-browser": "^6.1.0",
    "@angular/platform-browser-dynamic": "^6.1.0",
    "@angular/router": "^6.1.0",
    "angular2-uuid": "^1.1.1",
    "chartist": "^0.11.0",
    "core-js": "^2.5.4",
    "jquery": "^3.3.1",
    "rxjs": "^6.0.0",
    "rxjs-compat": "^6.2.2",
    "webpack": "^4.16.3",
    "zone.js": "~0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.7.0",
    "@angular/cli": "^6.1.2",
    "@angular/compiler-cli": "^6.1.0",
    "@angular/language-service": "^6.1.0",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "~4.2.1",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~1.7.1",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.0",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "npm-install-webpack-plugin": "^4.0.5",
    "protractor": "~5.3.0",
    "ts-node": "~5.0.1",
    "tslint": "~5.9.1",
    "typescript": "^2.7.2",
    "webpack-cli": "^3.1.0",
    "webpack-dev-server": "^3.1.5"
  }
}
  1. delete package_locked.json
  2. delete node_modules folder
  3. npm install
  4. Then ng build --prod was successful.

@albanx
Copy link

albanx commented Dec 16, 2018

The problem might be in the ^ of the packages. IN my case the problem was typescript version I had
"typescript": "^3.1.3", and npm installed version 3.2.2.

Changed to "typescript": "3.1.3", ran npm install and the problem got fixed.

@EssieShey
Copy link

I believe you missed type of chartist package.
Try below:
npm install chartist

@gerardcarbo
Copy link

gerardcarbo commented Feb 6, 2019

Same error in @angular/cli 7.3.0 when running 'ng serve --proxy-config proxy.conf.js --port 4500 -o':

"dependencies": {
    "@angular/animations": "7.2.0",
    "@angular/cdk": "^7.2.1",
    "@angular/common": "7.2.0",
    "@angular/compiler": "^7.2.0",
    "@angular/core": "7.2.0",
    "@angular/flex-layout": "^7.0.0-beta.22",
    "@angular/forms": "^7.2.0",
    "@angular/http": "7.2.0",
    "@angular/material": "^7.2.1",
    "@angular/platform-browser": "7.2.0",
    "@angular/platform-browser-dynamic": "7.2.0",
    "@angular/router": "7.2.0",
    "@angular/service-worker": "7.2.0",
    "@auth0/angular-jwt": "^2.0.0",
    "@ngx-formly/core": "^4.8.2",
    "@ngx-formly/material": "^4.8.2",
    "@ngx-translate/core": "^11.0.1",
    "@ngx-translate/http-loader": "^4.0.0",
    "core-js": "^2.6.2",
    "es6-promise": "^4.2.5",
    "hammerjs": "^2.0.8",
    "material-design-icons-iconfont": "^4.0.3",
    "moment": "^2.22.1",
    "ngx-cookie": "^4.1.2",
    "rxjs": "^6.3.3",
    "tslib": "^1.9.0",
    "url": "^0.11.0",
    "util": "^0.11.0",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.13.0",
    "@angular/cli": "^7.3.0",
    "@angular/compiler-cli": "^7.2.0",
    "@angular/language-service": "7.2.0",
    "@angular/platform-server": "^7.2.0",
    "@biesbjerg/ngx-translate-extract": "^2.3.1",
    "@nguniversal/express-engine": "^7.0.2",
    "@ngx-rocket/scripts": "^3.0.1",
    "@types/jasmine": "^3.3.5",
    "@types/jasminewd2": "^2.0.5",
    "@types/lodash": "^4.14.117",
    "@types/node": "^10.12.0",
    "typescript": "^3.2.4"
}
ERROR in : TypeError: Cannot read property 'kind' of undefined
    at getAssignmentTargetKind (...\node_modules\typescript\lib\typescript.js:10228:28)
    at Object.isAssignmentTarget (...\node_modules\typescript\lib\typescript.js:10271:16)
    at checkObjectLiteral (...\node_modules\typescript\lib\typescript.js:47313:45)
    at checkExpressionWorker (...\node_modules\typescript\lib\typescript.js:51812:28)
    at checkExpression (...\node_modules\typescript\lib\typescript.js:51757:42)
    at checkExpressionWithContextualType (...\node_modules\typescript\lib\typescript.js:51587:26)
    at checkApplicableSignature (...\node_modules\typescript\lib\typescript.js:48906:35)
    at chooseOverload (...\node_modules\typescript\lib\typescript.js:49225:26)
    at resolveCall (...\node_modules\typescript\lib\typescript.js:49177:26)
    at resolveCallExpression (...\node_modules\typescript\lib\typescript.js:49484:20)
    at resolveSignature (...\node_modules\typescript\lib\typescript.js:49772:28)
    at getResolvedSignature (...\node_modules\typescript\lib\typescript.js:49804:26)
    at checkCallExpression (...\node_modules\typescript\lib\typescript.js:49896:29)
    at checkExpressionWorker (...\node_modules\typescript\lib\typescript.js:51823:28)
    at checkExpression (...\node_modules\typescript\lib\typescript.js:51757:42)
    at resolveDecorator (...\node_modules\typescript\lib\typescript.js:49691:28)

i 「wdm」: Failed to compile.

It fails on rebuilding the project when changes are detected. Forcing a new rebuild (changing some code) use to build it correctly.

@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 9, 2019
@clydin clydin removed their assignment Jun 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity3: broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.