question-mark
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.

node_modules/@use-it/interval/types/index.d.ts' is not a module.ts

See original GitHub issue

Hi,

I am using @use-it/interval yarn package in my react + typescript project.

yarn add @use-it/interval

When I import it as below, I got this ‘File: node_modules/@use-it/interval/types/index.d.ts’ is not a module.ts’

import useInterval from '@use-it/interval';

It fixes the error when I change declare module '@use-it/use-interval to this declare module '@use-it/interval which I don’t want to do.

Is it the known issue?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
allcontributors[bot]commented, Apr 12, 2019

@donavon

I’ve put up a pull request to add @michaelsync! 🎉

1reaction
michaelsynccommented, Apr 12, 2019

Thanks. It seems like I got my local node_module issue. It works in new Sandbox and new local test. Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript typings give me "index.d.ts is not a module"
The index.d.ts file indeed is not a module, it just references two other files with interfaces in them. So I thought to remove...
Read more >
types/tween.js index.d.ts is not a module · Issue #20480 - GitHub
I tried using the @types/xxxx package and had problems. I tried using the latest stable version of tsc.
Read more >
heremaps index.d.ts is not a module - Budi Irawan
ts' is not a module. It is because heremaps is a browser library, but I'm using moduleResolution: "node" in my tsconfig.
Read more >
File is not a module error in TypeScript | bobbyhadz
The file another-file.ts is not a module, because it doesn't have an export or import statement. To solve the error, we have to...
Read more >
types/types.d.ts' is not a module.ts(2306) - DataTables
Link to test case: https://codesandbox.io/s/nostalgic-ishizaka-31yfdc?file=/src/datatables.ts Debugger code (debug.datatables.net): Error ...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found