MadKudu / node-hubspot

Node wrapper for the HubSpot API
MIT License
192 stars 157 forks source link

Cannot re-export a type when the '--isolatedModules' flag is provided #279

Open JosephYeoh opened 4 years ago

JosephYeoh commented 4 years ago

My project uses Typescript and babel 7. When running tsc its throwing this error:

error TS1205: Cannot re-export a type when the '--isolatedModules' flag is provided.
77 export { File, HubspotFile, HubspotImage }

I could turn off isolatedModules flag from my tsconfig.json but according to the caveat section of babel 7, it is recommended to keep the isolatedModules flag to true. Is there a workaround for this?

Fairly new to asking quesitons, please let me know if i'm being unclear.

jamesrwaugh commented 4 years ago

Installing it with npm install hubspot gives me the same. I had to also npm install @types/request-promise, but then I ran into this.

LRNZ09 commented 4 years ago

I'm also having the same exact problem, since with CRA the flag isolatedModules must be true.

nunof07 commented 4 years ago

Did you find any workaround?

I think one of the issues is that this library uses *.ts files for type declarations instead of *.d.ts (just tried a local patch).

bradgreens commented 3 years ago

Same issue here.

@pcothenet is it possible to merge https://github.com/MadKudu/node-hubspot/pull/293?