-
-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Labels
Description
Syncpack version
14.0.0-alpha.32
Operating system(s)
Mac
Steps to reproduce
- Use pnpm as the package manager.
- Add a JS/TS-based syncpack config (for example .syncpackrc.js or .syncpackrc.cjs):
module.exports = {
semverGroups: [
{ dependencyTypes: ["peer"], range: "^" }
]
};
- Run syncpack via pnpm:
pnpm exec syncpack fix --config .syncpackrc.cjs
Expected behavior
- syncpack should successfully load and execute the JS/TS config file when run via pnpm exec
- No npm-related warnings should be emitted
- The command should not fail due to stderr output unrelated to syncpack itself
Actual behavior
- syncpack spawns npx internally when loading JS/TS configs
- Because the process is already running under pnpm, npm receives pnpm-specific env config (e.g. npm_config_verify_deps_before_run)
- npm prints:
node.js/npx/tsx process failed swith stderr: npm warn unknown env config "verify-deps-before-run"
Contents of syncpack configuration file
Optional comments
Problem is probably here: https://github.com/JamieMason/syncpack/blob/main/src/rcfile/javascript.rs#L75
let runner = if use_bunx { "bunx" } else { "npx" };
This causes npm to be invoked inside a pnpm process, which is not a supported or safe combination and leads to npm warnings being emitted on stderr.
Code of Conduct
- I agree to follow the Code of Conduct
JamieMason
module.exports = { semverGroups: [ { dependencyTypes: ["peer"], range: "^" } ] };