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 in import: "Module not found" when using moduleResolution: "bundler" #23

Open
codegain opened this issue Oct 14, 2024 · 0 comments

Comments

@codegain
Copy link

Hi,

I'm trying to get around the following problem. With "moduleResolution": "bundler" set in my tsconfig.json and importing elevio as described in the README, I'm getting these errors:

import Elevio from 'elevio/lib/client';


TS2307: Cannot find module 'elevio/lib/client' or its corresponding type declarations.

(and this also is marked as an Error in the IDE + typehints are turned off)

import { client as Elevio } from 'elevio';


Module build failed: Module not found:
"./node_modules/elevio/esm/react.js" contains a reference to the file "react".
This file can not be found, please check it for typos or update it if the file got moved.

(I'm not using react and trying to import elevio inside of a normal .ts file)

It does work when I set "moduleResolution": "node", but this is not recommended by the default svelte tsconfig. Is there any way to enable "moduleResolution": "bundler" support?

Currently on v1.3.8

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

1 participant