You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was creating a new package in a monorepo by copying an existing one. I forgot to change the name and ended up with two workspaces having identical names. pnpm install did not complain, manypkg did not either. It’d be great to see an error (DUPLICATE_PACKAGE_NAME?) in this case.
Side observation: I removed "name" from packages/c/package.json just to see what happens. pnpm manypkg check produced this:
☔️ error PackageJsonMissingNameError: The following package.jsons are missing the "name" field:
☔️ error packages/c/package.json
☔️ error at validatePackages (/path/to/project/node_modules/@manypkg/get-packages/dist/manypkg-get-packages.cjs.dev.js:57:11)
☔️ error at Object.getPackages (/path/to/project/node_modules/@manypkg/get-packages/dist/manypkg-get-packages.cjs.dev.js:35:3)
☔️ error at async /path/to/project/node_modules/@manypkg/cli/dist/manypkg-cli.cjs.dev.js:813:7 {
☔️ error directories: [ 'packages/c/package.json' ]
☔️ error }
I was expecting to see INVALID_PACKAGE_NAME but got the crash instead. This is a pretty niche edge case, so not a big deal. Just flagging in case if a fix can be easily done simultaneously.
I was creating a new package in a monorepo by copying an existing one. I forgot to change the name and ended up with two workspaces having identical names.
pnpm install
did not complain,manypkg
did not either. It’d be great to see an error (DUPLICATE_PACKAGE_NAME
?) in this case.Here is an MWE for
@manypkg/cli@0.22.0
:https://github.com/kachkaev/manypkg-issue-235
The text was updated successfully, but these errors were encountered: