-
Notifications
You must be signed in to change notification settings - Fork 113
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 build next.js project if expo-router is in node_modules #363
Comments
Looks like it was just forgotten to get rid of the |
Trying to appease typescript by changing things inside of expo-router does not work, as it just runs into the next error. For example, there was a different error that I ran into before the one I posted above, which I tried to fix locally, and it just led to the next one:
The issue here is that next.js should not be checking types of expo-router in node_modules. This seems to be related to a weird limitation with typescript and how expo-router provides their The comment I linked to above also links to a typescript issue that further illustrates the problem: #323 (comment) |
Looks like this PR fixes the issue: #372 |
i've confirmed this is fixed in |
Summary
Running
next build
will cause next.js to do type checking on the project. Even thoughtsconfig
is setup properly (proper include, exclude: ["node_modules"], skipLibCheck: true), TS will still start type checking expo-router and throw an error:To be clear, i'm not using expo-router on web, or in next.js. It's part of a shared component that gets used in a native expo project and a next.js web project.
Minimal reproducible example
yarn build
The text was updated successfully, but these errors were encountered: