Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'web-oidc/remix' or its corresponding type declarations.ts(2307) #44

Open
moishinetzer opened this issue Aug 29, 2023 · 3 comments

Comments

@moishinetzer
Copy link

moishinetzer commented Aug 29, 2023

My project is not in esm, would that affect this? The types aren't being detected.

I.e. I have a basic remix project, I use the import syntax but I don't have type: "module" in my package.json.

Node v20.5.1

@sergiodxa
Copy link
Owner

Check in your tsconfig.json that you have moduleResolution set as Bundler, this is going to be the default value starting Remix v2.

https://github.com/remix-run/remix/blob/3e36c8dd8345e9896b91c48382501bf1380613f3/templates/remix/tsconfig.json#L8

@keul
Copy link

keul commented Sep 4, 2023

I had also to add this package to the serverDependenciesToBundle remix configuration

@sergiodxa
Copy link
Owner

@keul you can also set serverModuleFormat to esm, which will be the default starting Remix v2, but then you will need to add to serverDependenciesToBundle every CJS dependency.

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

No branches or pull requests

3 participants