Module Resolution - ERR_MODULE_NOT_FOUND when adding dependency in newly created svelte kit app #14609
Replies: 1 comment
-
I figured out that I needed to disable server side rendering, as the dependency needs to be loaded in the browser |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm experiencing an ERR_MODULE_NOT_FOUND when an external dependency is resolving its internal imports. Tried this in a newly created Sveltekit app. Would appreciate any suggestions on how to get past this issue (configuration changes or changes needed to the dependency). Here are the steps I took:
npm i @maxgraph/core
Result:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.../node_modules/@maxgraph/core/lib/view/mixins/_graph-mixins-types' imported from .../node_modules/@maxgraph/core/lib/index.js
at finalizeResolution (node:internal/modules/esm/resolve:275:11)
at moduleResolve (node:internal/modules/esm/resolve:932:10)
at defaultResolve (node:internal/modules/esm/resolve:1056:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:650:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:599:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:582:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:241:38)
at ModuleJob._link (node:internal/modules/esm/module_job:132:49) {
code: 'ERR_MODULE_NOT_FOUND',
I've verified that in the following two files exist:
.../node_modules/@maxgraph/core/lib/view/mixins/_graph-mixins-types.js
.../node_modules/@maxgraph/core/lib/view/mixins/_graph-mixins-types.d.ts
Beta Was this translation helpful? Give feedback.
All reactions