Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React app build failed for popper js typescript error

I have react app that used bootstrap 4.3.1 as node modules.When i am building the app its giving below error TypeScript error in /codebuild/output/src478180495/src/app-name/node_modules/@popperjs/core/lib/createPopper.d.ts(1,13): '=' expected. TS1005 > 1 | import type { OptionsGeneric, Modifier, Instance, VirtualElement } from "./types"; It was fine earlier. error coming up today.

like image 576
DIPESH NAYAK Avatar asked Mar 03 '21 12:03

DIPESH NAYAK


1 Answers

It is due to a new syntax introduced by Typescript type-only-imports-and-export

Upgrade your typescript module in package.json to > 3.8.0 and @type definitions should solve this issue.

Heres the related Stackoverflow topic.

like image 104
Zachary Zhou Avatar answered Oct 15 '22 11:10

Zachary Zhou