firebase-tools: is:npm hidden command is broken due to invalid config arguments (duplicate config)
I’m using the (hidden) is:npm function to check the latest available version of firebase-tools in my Github action.
I understand that this might be a bit on the edge of supported, however the is:npm
function in firepit
seems broken at the moment, which is probably not intended 😃
[REQUIRED] Environment info
firebase-tools:
firebase-tools standalone 12.4.4
Platform:
ubuntu, did not test on other platforms, but could be equally affected.
[REQUIRED] Test case
run firebase is:npm
[REQUIRED] Steps to reproduce
run firebase is:npm
[REQUIRED] Expected behavior
Calls the embedded npm
[REQUIRED] Actual behavior
Returns an error similar to
Error: double-loading config "/home/botteaap/.cache/firebase/runtime/npmrc" as "global", previously loaded as "user"
at Config.#loadObject (/snapshot/firepit/node_modules/npm/node_modules/@npmcli/config/lib/index.js:571:13)
at /snapshot/firepit/node_modules/npm/node_modules/@npmcli/config/lib/index.js:617:31
at async Config.#loadFile (/snapshot/firepit/node_modules/npm/node_modules/@npmcli/config/lib/index.js:616:5)
at async Config.load (/snapshot/firepit/node_modules/npm/node_modules/@npmcli/config/lib/index.js:287:5)
at async Npm.#load (/snapshot/firepit/node_modules/npm/lib/npm.js:195:5)
at async /snapshot/firepit/node_modules/npm/lib/cli-entry.js:40:5
The root cause seems to be that the same npmrc
is passed to npm
here https://github.com/firebase/firebase-tools/blob/master/standalone/firepit.js#L186 which apparently is no longer allowed.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 11
- Comments: 19 (11 by maintainers)
I’ve downgraded to 12.4.3 which doesn’t have this bug. I also reproduced this on mac os in the mean time. My function deploys were failing with 12.4.4 because of this too.
@hvisser Thanks for all the research into this, I’m looking into a fix now (hopefully without going all the way back to npm 6.x). Apologies for the delay on this - I had deprioritized it in my head since
is:npm
isn’t an officially supported command, but since this seems to affect any call to npm from the standalone version of the CLI, it is much more concerning.Any updates on this maybe? I’m stuck on 12.4.3 because my functions do not deploy with the the firepit version.
Is there a temporary workaround to this issue? Should I downgrade
firebase-tools
?Actually, this seems a bit more severe as I’m also seeing the same error when running
firebase deploy
with the standalone version (at the point where it’s calling out to runnpm run lint
)