jsr
jsr copied to clipboard
Resolving node_modules on publish in a monorepo
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.
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.
@lucacasonato I've a nearly same issue: https://github.com/jsr-io/jsr/issues/543 My repo is public.
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!