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

ERR_MODULE_NOT_FOUND with latest version #41

Closed
spbaecchi opened this issue Nov 29, 2022 · 2 comments
Closed

ERR_MODULE_NOT_FOUND with latest version #41

spbaecchi opened this issue Nov 29, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@spbaecchi
Copy link

Describe the bug
trpc-sveltekit cannot be imported

To Reproduce
Steps to reproduce the behavior:

  1. copy bookstall folder from examples somewhere in your filesystem (e.g., into /tmp/, so that it does not have the package source in one of the parent directories)
  2. cd in to the bookstall folder you just copied and run npm install
  3. run npm run dev
  4. open browser to see the error

Expected behavior
the example should work without errors

Full Error

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/tmp/bookstall/node_modules/trpc-sveltekit/dist/client' imported from /tmp/bookstall/node_modules/trpc-sveltekit/dist/index.js
    at new NodeError (node:internal/errors:372:5)
    at finalizeResolution (node:internal/modules/esm/resolve:405:11)
    at moduleResolve (node:internal/modules/esm/resolve:964:10)
    at defaultResolve (node:internal/modules/esm/resolve:1173:11)
    at ESMLoader.resolve (node:internal/modules/esm/loader:604:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:318:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:80:40)
    at link (node:internal/modules/esm/module_job:78:36)

Desktop:

  • OS: Ubuntu 22.04.1
  • Browser: Chorme
  • Version 107.0.5304.110

Additional context
The same problem arises when installing trpc-sveltekit from npm in any other project. Interestingly, copying the package folder containing the source of the trpc-sveltekit package in the root of the project and installing it with npm install package/ fixes the issue.

@spbaecchi spbaecchi added the bug Something isn't working label Nov 29, 2022
@spbaecchi
Copy link
Author

Probably related to #40

@icflorescu
Copy link
Owner

Thanks!
Yes, related to #40 indeed. Was tired and stupid last night when I pushed.
Should be fine now.
I'll probably switch to esbuild at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants