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.

`import =` is not supported by @babel/plugin-transform-typescript

See original GitHub issue

For Int64 the generated code is:

import Int64 = require("node-int64");

But this syntax is not supported by @babel/plugin-transform-typescript, and I think

import Int64 from "node-int64"

should work the same.

I wonder why choosed to use import = statement?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

hayescommented, Apr 20, 2019

I’ve opened #155 to update the thrift-server output to imit import = statements. Doing this for the apache output might be a little harder, but I have not looked at it closely.

shynomecommented, Oct 2, 2019

I also have this problem.

I change import Int64 = require("node-int64"); to import Int64 from "node-int64";, that make my next.js api work

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript import = is not supported. #7062 - babel ... - GitHub
When importing a module using export =, TypeScript-specific import module = require("module") must be used to import the module. Current ...
Read more >
This plugin adds support for the types syntax used by the TypeScript programming language. ... This is so that we know that the...
Read more >
`import =` is not supported by @babel/plugin-transform ...
I end up with the following error though when compiling: import = is not supported by @babel/plugin-transform-typescript Please consider using ...
Read more >
Workaround: Remove the const , which makes it available at runtime. Does not support export = and import = , because those cannot...
Read more >
@babel/plugin-transform-typescript - npm
Transform TypeScript into Latest version: 7.20.7, last published: 2 days ago. Start using @babel/plugin-transform-typescript in ...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found