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

Error cant find module: import createServer from '@inertiajs/react/server'; #1416

Closed
mohammad-hassani opened this issue Jan 31, 2023 · 5 comments
Labels
react Related to the react adapter

Comments

@mohammad-hassani
Copy link

Version:

  • @inertiajs/react version: 1.0.0

Describe the problem:

cant find module when I import createServer from '@inertiajs/react/server';
in ssr.jsx file

Steps to reproduce:

I'm upgrading Inertia from 0.11.1 to 1.0.0 and using upgrade guide from official web page

@mohammad-hassani mohammad-hassani added the react Related to the react adapter label Jan 31, 2023
@stephenglass
Copy link
Contributor

I'm experiencing the same issue. Although eslint only shows the error when its a tsx file and not jsx, either way it cant find the createServer module from '@inertiajs/react/server'.

@jessarcher
Copy link
Member

Thanks for reporting! This has been fixed in #1397, which we'll be releasing soon.

@rockblings
Copy link

Experiencing the same issue, while we wait for the release, is there is workaround?

@mohammad-hassani
Copy link
Author

mohammad-hassani commented Feb 13, 2023

Experiencing the same issue, while we wait for the release, is there is workaround?

@rockblings
you can change the .jsx to .tsx format and it's work fine

or in bad way you can remove the "checkJs": true, from jsconfig.json

@rockblings
Copy link

Experiencing the same issue, while we wait for the release, is there is workaround?

@rockblings you can change the .jsx to .tsx format and it's work fine

or in bad way you can remove the "checkJs": true, from jsconfig.json

Thanks for your response but it is already in .tsx and still cant find the module

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

No branches or pull requests

4 participants