QuiiBz / sherif

Opinionated, zero-config linter for JavaScript monorepos
MIT License
889 stars 13 forks source link

thread 'main' panicked at src/rules/non_existant_packages.rs:138:26: #95

Closed jellydn closed 1 month ago

jellydn commented 2 months ago

Hi @QuiiBz,

Thank you for your great work. I saw your post on x.com about v1 release. I wanted to give a try on my monorepo and got below error.

bunx sherif --fix --no-install
thread 'main' panicked at src/rules/non_existant_packages.rs:138:26:
called `Option::unwrap()` on a `None` value
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

I guess something is related with --no-install.

QuiiBz commented 2 months ago

This looks unrelated to any recent release. Could you share a link or minimal reproduction of your monorepo? It looks like you don't have any pnpm-workspace.yaml nor workspaces field configured.

jellydn commented 2 months ago

It looks like you don't have any pnpm-workspace.yaml nor workspaces field configured.

I don't think so. I could see this error if that's not under monorepo.

❯ bunx sherif --fix --no-install

 ⨯ error Failed to collect packages
   No `workspaces` field in the root `package.json`, or `pnpm-workspace.yaml` file not found in "."

Could you share a link or minimal reproduction of your monorepo?

Sure, I will try to set up a reproduction repo. I am using turborepo + yarn on my project.

QuiiBz commented 1 month ago

Hey! I've tried many different things to reproduce the issue, but no luck so far.

jellydn commented 1 month ago

Hi @QuiiBz Sorry, I forgot this one. I tried your tool on my project but it's under private repository which contains multi packages/apps (nodejs/.net/react/nextjs) + git submodule. I am not sure which one cause the issue yet.

jellydn commented 1 month ago

I guess something wrong with bunx as It's working for me with the below command.

❯ pnpm dlx sherif@latest --fix --no-install
QuiiBz commented 1 month ago

That's interesting, thanks. I'm gonna close this issue then but will try to reproduce with Bun too so we can open an issue on their side if needed.