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

TS2306: File 'blobs/v2/animate/index.js' is not a module. #4

Open
kareljan opened this issue Mar 20, 2021 · 3 comments
Open

TS2306: File 'blobs/v2/animate/index.js' is not a module. #4

kareljan opened this issue Mar 20, 2021 · 3 comments
Assignees

Comments

@kareljan
Copy link

When I import the animate blobs like this (or any other way) in typescript
import { canvasPath } from "blobs/v2/animate";
I keep getting the error TS2306: File 'blobs/v2/animate/index.js' is not a module. It works just fine. But it throws the error.
Any ideas?

@kareljan
Copy link
Author

Just to collaborate on this issue.
If you adjust the animate.ts file to

export default statefulAnimationGenerator(
    canvasBlobGenerator,
    renderPath2D,
    canvasKeyframeChecker,
);

And import like
import canvasPath from "pathToFiles";

All works and the error is gone.

@g-harel
Copy link
Owner

g-harel commented May 19, 2021

Hey, so sorry I missed this. Will take a look ASAP

@g-harel g-harel self-assigned this May 19, 2021
@g-harel
Copy link
Owner

g-harel commented May 19, 2021

Could you paste your tsconfig for me to reproduce, I think a fix for this may look like #7

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

2 participants