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 'virtua/solid' #420

Closed
imascha opened this issue Mar 28, 2024 · 4 comments · Fixed by #421
Closed

Cannot find module 'virtua/solid' #420

imascha opened this issue Mar 28, 2024 · 4 comments · Fixed by #421

Comments

@imascha
Copy link
Contributor

imascha commented Mar 28, 2024

Describe the bug
I am trying to follow the solid.js getting started in the inside the readme. But i am not able to import VList from virtua/solid.
When i use the VList from virtua i get the following browser error: Uncaught Error: Could not resolve "react/jsx-runtime" imported by virtua. Is it installed?
When i use VList from virtua/lib/solid i get the following node error: Internal server error: Missing "./lib/solid" specifier in "virtua" package

To Reproduce

  1. Created a new solid.js project: npx degit solidjs/templates/ts my-app
  2. Installed dependencies: npm install
  3. Installed the library: npm install virtua
  4. Copied the getting started Example inside the App.tsx

Platform:

  • OS: Windows
  • Browser: Chrome
  • Version of this package: 0.29.1
  • Version of framework: solid-js 1.8.11

Additional context
Am i doing something incorrectly or is something broken?

@inokawa
Copy link
Owner

inokawa commented Mar 28, 2024

Hi, what error happens if you import VList from virtua/solid?

@imascha
Copy link
Contributor Author

imascha commented Mar 28, 2024

@inokawa I am not able to import it. I get the following error in my VsCode: Cannot find module 'virtua/solid' or its corresponding type declarations

@inokawa
Copy link
Owner

inokawa commented Mar 28, 2024

If you have tsconfig, changing moduleResolution: "node" to moduleResolution: "bundler" may solve the problem because moduleResolution: "node" can't resolve exports of package.json.
https://github.com/solidjs/templates/blob/924ee8359dc908c3ca3bd622c0c32dd2d666c78e/ts/tsconfig.json#L6

@imascha
Copy link
Contributor Author

imascha commented Mar 28, 2024

Thanks, changing the moduleResolution has fixed the problem. This Ticket can be closed.

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

Successfully merging a pull request may close this issue.

2 participants