[Regression] changeset command fails if there is a side project without a name in package.json that is not intended to be published · Issue #2336 · changesets/changesets · GitHub
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
{{ message }}
Repository navigation
[Regression] changeset command fails if there is a side project without a name in package.json that is not intended to be published #2336
The name field in package.json is optional. If there is no reason to distribute the project's source code, such as in sample projects or package websites, there is little reason to explicitly add a name. If you forget to add private: true and accidentally run npm publish, the project's source code becomes a digital tattoo. However, if such a project exists in the repository, the changeset command fails as follows:
pnpm changeset
$ changeset
🦋 error PackageJsonMissingNameError: The following package.jsons are missing the "name" field:
🦋 error demos\astro\package.json
🦋 error demos\docusaurus\package.json
🦋 error demos\rspress\package.json
🦋 error demos\vitepress\package.json
🦋 error website\package.json
🦋 error at _callee$ (I:\markdown-cj-friendly\node_modules\.pnpm\@manypkg+get-packages@1.1.3\node_modules\@manypkg\get-packages\dist\get-packages.cjs.dev.js:232:19)
🦋 error at I:\markdown-cj-friendly\node_modules\.pnpm\@babel+runtime@7.29.7\node_modules\@babel\runtime\helpers\regeneratorRuntime.js:52:18
🦋 error at Generator.<anonymous> (I:\markdown-cj-friendly\node_modules\.pnpm\@babel+runtime@7.29.7\node_modules\@babel\runtime\helpers\regenerator.js:52:51)
🦋 error at Generator.next (I:\markdown-cj-friendly\node_modules\.pnpm\@babel+runtime@7.29.7\node_modules\@babel\runtime\helpers\regeneratorDefine.js:11:21)
🦋 error at asyncGeneratorStep (I:\markdown-cj-friendly\node_modules\.pnpm\@babel+runtime@7.29.7\node_modules\@babel\runtime\helpers\asyncToGenerator.js:3:17)
🦋 error at _next (I:\markdown-cj-friendly\node_modules\.pnpm\@babel+runtime@7.29.7\node_modules\@babel\runtime\helpers\asyncToGenerator.js:17:9) {
🦋 error directories: [
🦋 error 'demos\\astro\\package.json',
🦋 error 'demos\\docusaurus\\package.json',
🦋 error 'demos\\rspress\\package.json',
🦋 error 'demos\\vitepress\\package.json',
🦋 error 'website\\package.json'
🦋 error ]
🦋 error }
[ELIFECYCLE] Command failed with exit code 1.
Activity