tatethurston / nextjs-routes

Type safe routing for Next.js
MIT License
557 stars 21 forks source link

Cannot find module #118

Closed statusunknown418 closed 1 year ago

statusunknown418 commented 1 year ago
Screenshot 2023-01-19 at 12 45 03

VSCode seems no to be finding the types required for the package, pnpm add @types/nextjs-routes package doesn't exist as well

tatethurston commented 1 year ago

The types ship with the package. @types/nextjs-routes does not exist.

It looks like you’re trying to import the cjs module into mjs, which isn’t valid. Could you let me know if the issue persists if you import nextjs-routes/config or nextjs-routes/config.mjs?

statusunknown418 commented 1 year ago

the error is still present, I changed my next config to .config.js and used nextjs-routes/config but throws the error of no declarations found

Screenshot 2023-01-19 at 16 19 11

-- next.config.js and nextjs-routes/config.cjs still throws the same error, as well as next.config.mjs and nextjs-routes/config.mjs

tatethurston commented 1 year ago

Thanks for reporting @AlvaroAquijeDiaz. This has been fixed in v1.0.8.