Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug]: run fail in pnpm with read third-party config define #150

Closed
Gehbt opened this issue Sep 7, 2024 · 3 comments · Fixed by #151
Closed

[Bug]: run fail in pnpm with read third-party config define #150

Gehbt opened this issue Sep 7, 2024 · 3 comments · Fixed by #151

Comments

@Gehbt
Copy link

Gehbt commented Sep 7, 2024

config define, as long as have it
image

script define
image

run
image

Reproduction

https://github.com/Gehbt/nra2-bug-repo


In yarn or npm, It is fine.

@bcomnes
Copy link
Owner

bcomnes commented Sep 10, 2024

Thank you for the report, will investigate soon.

@bcomnes
Copy link
Owner

bcomnes commented Sep 13, 2024

It looks like npm-run-all2 is parsing out the special config field defined in the package.json spec:

https://docs.npmjs.com/cli/v10/configuring-npm/package-json?v=true#config

and passing it as a flag in the form of:

{
  execPath: '/opt/homebrew/Cellar/node/22.8.0/bin/node',
  spawnArgs: [
    '/opt/homebrew/Cellar/pnpm/9.9.0/libexec/lib/node_modules/pnpm/bin/pnpm.cjs',
    'run',
    '--nra2-bug-repo:commitizen_path=cz-conventional-changelog',
    'lint.check'
  ],
...
}

To be perfectly honest, I'm super unfamiliar with the config field in package.json and the various ways it gets used. Npm doesn't seem to care about it (and maybe even uses it somehow, I'm not sure). pnpm OTOH doesn't like extra fields. It looks like yarn also doesn't like the extra fields? Anyway, I'll skip adding those for pnpm as well since it clearly doesn't work when they are passed, and we also skip passing them for yarn classic..

@bcomnes
Copy link
Owner

bcomnes commented Sep 13, 2024

Try out https://github.com/bcomnes/npm-run-all2/releases/tag/v6.2.3 and please let me know if that works for you.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants