Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Import returning error "is not a module" when try to use hookrouter with CRA + typescript #158

Open
jrmarqueshd opened this issue Apr 21, 2021 · 2 comments

Comments

@jrmarqueshd
Copy link

Hello Devs.

To the owner repo or who wants to help him

I'm catch error when a import this module in my app component.

[App.tsx]
image

this is my package.json

[package.json]
image

For developers who want to solve the problem superficially until the owner of the repo solves it

I managed to fix this error by migrating the route config to a file called routes.js, it seems that the problem happens only in tsx | ts extensions!

after migrating the route settings, it looked like this:

[routes.js]
image

and in my App.tsx file, it looked like this:

[App.tsx]
image

I hope I have helped in some way. 😄

@jordanmack
Copy link

jordanmack commented May 21, 2021

See #147 for another workaround.

@a613
Copy link

a613 commented Dec 21, 2021

Or downgrade from 1.2.5 to 1.2.3.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants