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.

reakit-theme-default/ts/index.d.ts (3,45): Cannot find module 'styled-tools'.

See original GitHub issue

Bug report

What is the current behavior? If there is a heard reload (force reload from the browser) or create-react-app (with the typescript scripts) hot reloads/reloads the following error appears.

reakit-theme-default/ts/index.d.ts (3,45): Cannot find module 'styled-tools'.

Won’t go away unless i save inside a typescript file and let it reload it self.

If the current behavior is a bug, please provide the steps to reproduce.

Use any reakit components when using the reakit-theme-default with the Provider component used

What is the expected behavior?

It should not cause that error

Other relevant information: my related packages versions “react-scripts-ts”: “3.1.0”, “reakit”: “^0.15.7”, “reakit-theme-default”: “^0.1.8”, “styled-tools”: “^1.5.1”

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
tcodes0commented, Oct 29, 2018

Where do you see nodemon being used ?

I didn’t look, sorry. I just meant “reload thing” lol

try on vscode: cmd+shift+p select typescript version, set to workspace. can you pin the issue down to TS? does it happen if you don’t use TS?

1reaction
tcodes0commented, Oct 29, 2018

Seems to be happening after a set amount of time

Doesn’t make sense to me. I’d guess it’s a local thing.

  • try using another text editor (not vscode)
  • noticed it has an auto reload thing? ~nodemon~ ? could be that.
  • try rm -fr node_modules && yarn
Read more comments on GitHub >

github_iconTop Results From Across the Web

cannot find module node_modules/styled-components ...
issue when installing styled-components through npm. command: npm install styled-components error: npm ERR! code 1 npm ERR! path ...
Read more >
Could not find a declaration file for module 'styled-components ...
So, to resolve: npm install --save-dev @types/styled-components-react-native. or yarn add -D @types/styled-components-react-native.
Read more >
Could not find declaration file for 'styled-components'
The error "could not find declaration file for module 'styled-components'" occurs when TypeScript cannot find the type declaration for a ...
Read more >
styled-tools - npm
Start using styled-tools in your project by running `npm i styled-tools`. There are 484 other projects in the npm registry using styled-tools.
Read more >
cannot find module '...' or its corresponding type declarations
I've been trying to deploy my nextjs app on Vercel, but got "Type error: cannot find module '...' or its corresponding type declarations" ......
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