question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

an ambient enum declarations member initializer must be constant expression

See original GitHub issue

I tried to use it with Angular CLI without AOT stuff. But I’m getting a bunch of typescript errors. Can anybody provide me with some guidance on how to fix that?

ERROR in /Users/alexanderkozhevin/Desktop/hypermedia/pheromone/node_modules/@swimlane/ngx-ui/release/components/input/input-types.d.ts (2,12): In ambient enum declarations member initializer must be constant expression.

ERROR in /Users/alexanderkozhevin/Desktop/hypermedia/pheromone/node_modules/@swimlane/ngx-ui/release/components/input/input-types.d.ts (3,14): In ambient enum declarations member initializer must be constant expression.

ERROR in /Users/alexanderkozhevin/Desktop/hypermedia/pheromone/node_modules/@swimlane/ngx-ui/release/components/input/input-types.d.ts (4,16): In ambient enum declarations member initializer must be constant expression.

ERROR in /Users/alexanderkozhevin/Desktop/hypermedia/pheromone/node_modules/@swimlane/ngx-ui/release/components/input/input-types.d.ts (5,16): In ambient enum declarations member initializer must be constant expression.

ERROR in /Users/alexanderkozhevin/Desktop/hypermedia/pheromone/node_modules/@swimlane/ngx-ui/release/components/date-time/date-time.type.d.ts (2,12): In ambient enum declarations member initializer must be constant expression.

ERROR in /Users/alexanderkozhevin/Desktop/hypermedia/pheromone/node_modules/@swimlane/ngx-ui/release/components/date-time/date-time.type.d.ts (3,12): In ambient enum declarations member initializer must be constant expression.

ERROR in /Users/alexanderkozhevin/Desktop/hypermedia/pheromone/node_modules/@swimlane/ngx-ui/release/components/date-time/date-time.type.d.ts (4,16): In ambient enum declarations member initializer must be constant expression.

ERROR in /Users/alexanderkozhevin/Desktop/hypermedia/pheromone/node_modules/@swimlane/ngx-ui/release/components/notification/notification-style.type.d.ts (2,12): In ambient enum declarations member initializer must be constant expression.

ERROR in /Users/alexanderkozhevin/Desktop/hypermedia/pheromone/node_modules/@swimlane/ngx-ui/release/components/notification/notification-style.type.d.ts (3,15): In ambient enum declarations member initializer must be constant expression.

ERROR in /Users/alexanderkozhevin/Desktop/hypermedia/pheromone/node_modules/@swimlane/ngx-ui/release/components/notification/notification-style.type.d.ts (4,13): In ambient enum declarations member initializer must be constant expression.

ERROR in /Users/alexanderkozhevin/Desktop/hypermedia/pheromone/node_modules/@swimlane/ngx-ui/release/components/notification/notification-style.type.d.ts (5,15): In ambient enum declarations member initializer must be constant expression.

ERROR in /Users/alexanderkozhevin/Desktop/hypermedia/pheromone/node_modules/@swimlane/ngx-ui/release/components/notification/notification-style.type.d.ts (6,12): In ambient enum declarations member initializer must be constant expression.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:21 (1 by maintainers)

github_iconTop GitHub Comments

27reactions
AlexanderKozhevincommented, Aug 8, 2017

I installed latest typescript version inside project. Not globally.

npm install typescript@next --save

And it’s working now

22reactions
wilkinsleung0712commented, Sep 5, 2017

npm install typescript@2.4.2–save has saved my day

Read more comments on GitHub >

github_iconTop Results From Across the Web

(TS) In 'const' enum declartions member initializer must be ...
Build:In 'const' enum declarations member initializer must be constant expression. Code with error: export declare const enum JSDocTagName { ...
Read more >
an ambient enum declarations member initializer must be ...
I tried to use it with Angular CLI without AOT stuff. But I'm getting a bunch of typescript errors. Can anybody provide me...
Read more >
TS. Ambient enums with non-constant expression : WEB-40588
declare enum E2 { x = 'foo'.length // In ambient enum declarations member initializer must be constant expression } enum E3 { x...
Read more >
swimlane/ngx-datatable - Gitter
type.d.ts (3,13): In ambient enum declarations member initializer must be constant expression. ERROR in /Users/admin/Sites/my_app/node_modules/@swimlane/ngx- ...
Read more >
Ionic 3 typescript errors - SDKs - #sentry
... line: 6 [app-scripts] In ambient enum declarations member initializer must be constant expression. [app-scripts] L3: Fatal = "fatal", ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found