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

Can't run NextJS + Typescript + Linaria + Yarn Workspaces #18

Open
bruno2ms opened this issue Dec 21, 2022 · 2 comments
Open

Can't run NextJS + Typescript + Linaria + Yarn Workspaces #18

bruno2ms opened this issue Dec 21, 2022 · 2 comments

Comments

@bruno2ms
Copy link

I've set an initial project for NextJS + Typescript + Linaria + Yarn Workspaces but when adding Linaria and next-linaria, my project doesn't work anymore and I get errors about the typescript types and stuff.

Does anyone know what can I do to solve this?

This is my minimal repo with the problem:
https://github.com/bruno2ms/nextjs-linaria-yarn-workspaces

This is the error I'm getting (same error on console):
image

@SerekKiri
Copy link

Hey! 👋🏼
This is not a problem related to either linaria or next-linaria. You're importing typescript file to your project and it can't read it. You can compile it with tsc that you already have in your utils folder or use references in web/tsconfig.json.

@AshConnolly
Copy link

I'm getting the same exact issue. It only occurs when I change from
export default nextConfig
to
export default withLinaria(nextConfig)
the error doesn't occur using a different config wrapper like:
export default WithNextMDX(nextConfig)

So I believe this is an issue with next-linaria, but might be wrong.

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