Skip to content

package.json name different from module name cause panic #167

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

endosama
Copy link
Collaborator

@endosama endosama commented Jul 2, 2025

Hey!
I started getting some issues when bumping from version 1.0.9 to 1.2.2.
We're currently importing this package in our codebase (monorepo):
https://github.com/teamwalnut/rescript-urql
Which has a rescript-urql name in the package.json but a different name @urql/rescript in the bsconfig.json

When the package is resolved, it's stored with rescript-urql as a key, but when resolving the dependencies in our project, we reference the bsconfig.json name of the module, so @urql/rescript, causing a:

thread '<unnamed>' panicked at src/build/compile.rs:568:17:
Expected to find dependent package @urql/rescript of <my-package>

I can change the package.json name for that project, but I'm not sure if that's the correct behaviour and we should instead rely always only on the name in the bsconfig/rescript.json 🤔

If needed, I can try creating a small environment with the issue or add some tests.
Let me know wdyt 🙏

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.

1 participant