yesmeck / remix-routes

Typesafe routing for your Remix apps.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Module '"remix-routes"' has no exported member '$path'.

roydigerhund opened this issue · comments

I just wanted to try out this package as I'm searching for a way to have type-safety on routes.

Unfortunately, I'm getting a Typescript error when I want to import $path.

Module '"remix-routes"' has no exported member '$path'.

When going to remix-routes/index.d.ts in node-modules I'm getting this error:

Cannot find module '.remix-routes/types' or its corresponding type declarations.ts

Any idea how to fix this? I would really like to test this.

I installed it with yarn and didn't get any errors during installation.

Have you run remix-routes after installation? What does the command output?

It just outputs ✨ Done in 0.XXs.

Does node_modules/.remix-routes exit?

Yes, and it contains a types.d.ts with the correct routes inside.
The index.js on the other hand does not contain any routes.

Just fixed a bug that watch mode does not generate types at first run. Could you upgrade remix-routes to the latest version and try again? If the problem still exits, could you create a reproduction repository?

Just updated and it seems to work now in build and watch mode.
Thanks 👍

By the way, that's a great package. I would have created it on my own if I hadn't found yours.