Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Package config variables not available to npm-alternatives #201

Open
ryansalerno opened this issue Mar 3, 2021 · 6 comments
Open

Package config variables not available to npm-alternatives #201

ryansalerno opened this issue Mar 3, 2021 · 6 comments

Comments

@ryansalerno
Copy link

A quick repro case:

"config": {
	"foo": "bar"
},
"scripts": {
	"vars": "echo $npm_package_config_foo",
	"fails": "run-s vars",
	"works": "npm run vars"
}

npm run ___ can run any of the three scripts successfully (as you'd expect).

pnpm can run vars directly or works, but fails on fails with:

 ERROR   ERROR  Unknown options: '<pkgname>:foo'

I suspect this is very related to #193, but the description there sounded like it was coming at this error from a different direction, so I didn't want to hijack Jakob's issue.

I haven't tested yarn, though #196 sounds like a similar fix could potentially address issues there as well? Especially since a script of yall -s vars runs successfully with pnpm.

@TigersWay
Copy link

Just felt in the same issue!
+1

@agileago
Copy link

+1

@rickstaa
Copy link

rickstaa commented Dec 20, 2021

Also encountering this issue when using commitizen. A workaround that works for commitizen is to use a .czrc config file. This, however, has to be fixed since other packages that use the package.json config field might not provide stand-alone config files.

sarayourfriend added a commit to WordPress/gutenberg that referenced this issue Feb 13, 2022
aboqasem added a commit to aboqasem/js-piston-api-client that referenced this issue Jun 2, 2022
Issue with using other package managers with npm-run-all: mysticatea/npm-run-all#201
devtribe pushed a commit to devtribe/turborepo-remote-cache that referenced this issue Nov 10, 2022
@josh-hemphill
Copy link

This is kinda important, and this repo hasn't had a release since 2018, anyone know if there's a popular fork yet?

@frank-lsf
Copy link

Bump, is there a fix?

@recallwei
Copy link

+1

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

No branches or pull requests

7 participants