Skip to content
This repository was archived by the owner on Oct 19, 2023. It is now read-only.

Conversation

@perrygovier
Copy link

Why:

  • When trying to compile w/ Babel in a React (Next.js) project, I get this error:
Failed to compile.

./node_modules/hubspot/lib/typescript/file.ts:77:16
Type error: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.

  75 | }
  76 | 
> 77 | export { File, HubspotFile, HubspotImage }
     |                ^
  78 | 
error Command failed with exit code 1.

The files in lib/typescript are all definition files. Adding .d to the filename resolves this issue.

This change addresses the need by:

  • Change the extension of the files in lib/typescript from .ts to .d.ts

@hmps hmps mentioned this pull request Feb 13, 2021
1 task
@em0ney
Copy link

em0ney commented Mar 30, 2021

can we get this merged?

@bradgreens
Copy link

My issue was also with Next.Js.
I was able to fix my build by doing the following in package.json:

  • "hubspot": "perrygovier/node-hubspot",
  • "next": "^10.1.3", # I bumped next.js up from 10.0.x

If I only updated the hubspot line then next build would hang forever. So bumping the next.js version solved a subsequent problem. Thanks @perrygovier for putting that out there.

@natterstefan
Copy link

Hey everyone, any update? What is required to get this merged? I just had the same issue as well...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants