You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using create-react-app with TypeScript enabled to build a React App. But when I want to compile the code I'm getting the following error: Type error: Ambient const enums are not allowed when the '--isolatedModules' flag is provided. TS1209.
Environment
blueprintjs/datetime: "^3.3.1"
react-scripts: "2.1.1",
Actual behavior
Creating an optimized production build...
Failed to compile.
/usr/src/app/node_modules/@blueprintjs/datetime/lib/esm/common/months.d.ts
Type error: Ambient const enums are not allowed when the '--isolatedModules' flag is provided. TS1209
5 | * easily compared to `date.getMonth()`.
6 | */
> 7 | export declare const enum Months {
| ^
8 | JANUARY = 0,
9 | FEBRUARY = 1,
10 | MARCH = 2,
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `react-scripts build`
npm ERR! Exit status 1
Possible solution
When I change the following line from export const enum Months
to export enum Months
in the node_modules blueprint/packages/datetime/src/common/months.ts
the App compiles correctly.
The text was updated successfully, but these errors were encountered:
Hello
I'm using create-react-app with TypeScript enabled to build a React App. But when I want to compile the code I'm getting the following error:
Type error: Ambient const enums are not allowed when the '--isolatedModules' flag is provided. TS1209
.Environment
Actual behavior
Possible solution
When I change the following line from
export const enum Months
to
export enum Months
in the node_modules
blueprint/packages/datetime/src/common/months.ts
the App compiles correctly.
The text was updated successfully, but these errors were encountered: