Skip to content

Verbose Debug Information: Node 94 (NullKeyword) was unexpected on typescript 2.1.1 #12684

@zhouweiming

Description

@zhouweiming

TypeScript Version: 2.1.1 / nightly (2.2.0-dev.20161206)

When I compile my angular2 project with webpack and awesome-typescript-loader, get errors:

[at-loader] Using typescript@2.2.0-dev.20161206 from typescript and "tsconfig.json" from /Users/zhouweiming/data/project/iermu_opssite/src/tsconfig.json

/Users/zhouweiming/data/project/iermu_opssite/src/node_modules/.typescript@2.2.0-dev.20161206/lib/typescript.js:62645
                throw e;
                ^

Error: Debug Failure. False expression: Unexpected node.
Verbose Debug Information: Node 94 (NullKeyword) was unexpected.
    at Object.assert (/Users/zhouweiming/data/project/iermu_opssite/src/node_modules/.typescript@2.2.0-dev.20161206/lib/typescript.js:3177:23)
    at Object.Debug.failBadSyntaxKind (/Users/zhouweiming/data/project/iermu_opssite/src/node_modules/.typescript@2.2.0-dev.20161206/lib/typescript.js:44765:55)
    at serializeTypeNode (/Users/zhouweiming/data/project/iermu_opssite/src/node_modules/.typescript@2.2.0-dev.20161206/lib/typescript.js:46715:30)
    at serializeTypeNode (/Users/zhouweiming/data/project/iermu_opssite/src/node_modules/.typescript@2.2.0-dev.20161206/lib/typescript.js:46683:56)
    at serializeTypeOfNode (/Users/zhouweiming/data/project/iermu_opssite/src/node_modules/.typescript@2.2.0-dev.20161206/lib/typescript.js:46544:28)
    at serializeParameterTypesOfNode (/Users/zhouweiming/data/project/iermu_opssite/src/node_modules/.typescript@2.2.0-dev.20161206/lib/typescript.js:46596:42)
    at addOldTypeMetadata (/Users/zhouweiming/data/project/iermu_opssite/src/node_modules/.typescript@2.2.0-dev.20161206/lib/typescript.js:46471:98)
    at addTypeMetadata (/Users/zhouweiming/data/project/iermu_opssite/src/node_modules/.typescript@2.2.0-dev.20161206/lib/typescript.js:46462:17)
    at transformAllDecoratorsOfDeclaration (/Users/zhouweiming/data/project/iermu_opssite/src/node_modules/.typescript@2.2.0-dev.20161206/lib/typescript.js:46301:13)
    at generateConstructorDecorationExpression (/Users/zhouweiming/data/project/iermu_opssite/src/node_modules/.typescript@2.2.0-dev.20161206/lib/typescript.js:46411:40)

get same error on [email protected] and [email protected] and [email protected].

other env:

  • mac os: 10.12.1
  • node: 7.2.0
  • webpack: 1.13.3
  • angular: 2.2.4
  • awesome-typescript-loader: 3.0.0-beta.9

When I remove @Injectable() from all my codes, my project can compile success, but in browser I get errors: can't resolve all params in a class who depend another @Injectable() class.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions