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

add test project (repro maplibre-contour not found) #283

Closed
wants to merge 1 commit into from

Conversation

gvkhna
Copy link

@gvkhna gvkhna commented Aug 27, 2024

A very quick repro for the following issue:

#280

following output running pnpm test:

❯ pnpm test

> [email protected] test /Users/.../github/maplibre-contour/test-project-ts
> tsc --noEmit && esbuild index.ts --bundle

index.ts:1:23 - error TS2307: Cannot find module 'maplibre-contour' or its corresponding type declarations.

1 import mlcontour from "maplibre-contour";
                        ~~~~~~~~~~~~~~~~~~


Found 1 error in index.ts:1

 ELIFECYCLE  Test failed. See above for more details.

Screenshot 2024-08-27 at 14 20 08 Large

tsc --traceResolution does not give me the same output as before. But otherwise is similar/same situation and error.

index.ts:1:23 - error TS2307: Cannot find module 'maplibre-contour' or its corresponding type declarations.

1 import mlcontour from "maplibre-contour";
                        ~~~~~~~~~~~~~~~~~~


Found 1 error in index.ts:1

Once removing exports the error is gone.

@msbarry
Copy link
Contributor

msbarry commented Aug 28, 2024

Thanks! I'm trying to understand, what exactly makes this different from test-project dir which does the same tsc --noEmit test?

@gvkhna
Copy link
Author

gvkhna commented Aug 28, 2024

I believe the difference may be "moduleResolution": "Bundler", in the tsconfig, which is the recommended setting for typescript 5.0+.

@msbarry
Copy link
Contributor

msbarry commented Aug 29, 2024

OK got it, thanks! I was able to reproduce this with a minimal change to the test projects (and also fix the package.json issue) here: #286 - how does that look to you?

@gvkhna
Copy link
Author

gvkhna commented Aug 29, 2024

Great to hear, LGTM!

@msbarry
Copy link
Contributor

msbarry commented Aug 29, 2024

Ok great. I merged the other and will put out a 0.0.8 release soon

@msbarry msbarry closed this Aug 29, 2024
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

Successfully merging this pull request may close these issues.

2 participants