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

Resolving node_modules on publish in a monorepo #526

Closed
roginfarrer opened this issue May 16, 2024 · 3 comments
Closed

Resolving node_modules on publish in a monorepo #526

roginfarrer opened this issue May 16, 2024 · 3 comments
Labels
publishing Problems with publishing

Comments

@roginfarrer
Copy link

This is my first time using JSR, so hopefully this isn't a silly question!

I have a monorepo (managed with bun) with two workspaces (the library and an app). Most of my node_modules are living in the root workspace directory. In my library directory, I tried running

bunx jsr publish --dry-run

and get an error like this:

error: Cannot find "@react-types/shared"
    at file:///Users/rfarrer/projects/carousel/aria-carousel/src/useCarouselState.ts:4:55
Child process exited with: 1

I'm assuming that JSR cannot resolve it because that module lives in one directory up, and not in the immediate library directory? Is there a solution to this or a current limitation of JSR?

I did find this discussion that suggests using Deno. I'm not using Deno for this project.

@lucacasonato
Copy link
Member

Hey, is the repo public? It'd be easier for to figure out the cause if we have a reproduction. This does look like a bug at first glance, but I can only confirm with a reproduction.

@jogibear9988
Copy link

@lucacasonato I've a nearly same issue: #543
My repo is public.

@roginfarrer
Copy link
Author

Sorry for the delay, I was waiting until my repo was public.

I actually tried again today, and I cannot recreate the error. I'm now getting an error for #24 about JSX, so I can't publish anyway. It's a bummer, but hopefully I can revisit sometime in the future!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
publishing Problems with publishing
Projects
Status: Done
Development

No branches or pull requests

3 participants