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_FOUND on SvelteKit #118

Open
bazhenov opened this issue Aug 26, 2022 · 4 comments
Open

ERR_MODULE_FOUND on SvelteKit #118

bazhenov opened this issue Aug 26, 2022 · 4 comments

Comments

@bazhenov
Copy link

bazhenov commented Aug 26, 2022

When using sveltekit starter script with vite, I cannot import typewriter. This code fails:

import { Editor } from "typewriter-editor"
Cannot find module '/Users/bazhenov/Developer/sveltekit-typewriter/node_modules/@typewriter/document/lib/EditorRange' imported from /Users/bazhenov/Developer/sveltekit-typewriter/node_modules/@typewriter/document/lib/index.js
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/bazhenov/Developer/sveltekit-typewriter/node_modules/@typewriter/document/lib/EditorRange' imported from /Users/bazhenov/Developer/sveltekit-typewriter/node_modules/@typewriter/document/lib/index.js
    at new NodeError (node:internal/errors:387:5)
    at finalizeResolution (node:internal/modules/esm/resolve:404:11)
    at moduleResolve (node:internal/modules/esm/resolve:965:10)
    at defaultResolve (node:internal/modules/esm/resolve:1173:11)
    at nextResolve (node:internal/modules/esm/loader:173:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:852:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:439:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
    at link (node:internal/modules/esm/module_job:75:36)

You can reproduce error running npm run dev on repository https://github.com/bazhenov/sveltekit-typewriter-bug:

$ git clone https://github.com/bazhenov/sveltekit-typewriter-bug
$ npm run dev

Navigate to http://localhost:5173/

@IsaacAndersen
Copy link

Also running into this issue, any luck?

@bazhenov
Copy link
Author

Also running into this issue, any luck?

Nope :(

@jacwright
Copy link
Member

I'm getting the same issue. The file EditorRange.js exists in the location. Does it need the .js to work? Why does Vite not automatically add it if so? Anyone know Vite well enough?

@TheBitmonkey
Copy link

#130

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

4 participants