CLI: using pnpm causes multiple npm list
errors written to CLI output for provider
, synth
and debug
commands
#2903
Labels
bug
Something isn't working
help wanted
Community contributions welcome as the core team is unlikely to work on this soon
priority/backlog
Low priority (though possibly still important). Unlikely to be worked on within the next 6 months.
size/medium
estimated < 1 week
Expected Behavior
When the
cdktf-cli
package is installed as a dev dependency viapnpm
, nonpm
errors are written to the output.Actual Behavior
When running some commands (
provider get
,debug
,synth
, multiple errors are written of the following form:I'm uncertain if this is causing an issue or not: the command ends up succeeding.
Steps to Reproduce
pnpm import yarn.lock
orpnpm import package-lock.json
)pnpm add cdktf-cli@latest
pnpm install
pnpm exec cdktf provider get
orpnpm exec cdktf debug
Versions
Providers
Gist
https://gist.github.com/jamestelfer/03f844d1e1dc83df2c7d79730545a7a3
Workarounds
I haven't seen this with a globally installed CLI, but I'm not 100% certain why.
We don't install the CLI globally as we want the local development environment consistent with CI, and we have multiple projects that don't necessarily change CLI versions at the same time.
Anything Else?
The command being run (
npm list jsii --json
or similar) works with pnpm:pnpm list jsii --json
. I haven't checked the JSON output.If
pnpm
was run if apnpm-lock.yaml
is detected, this would avoid the error.I don't know what the effect of this error is.
I'm willing to have a look at a fix, but I'm unsure of the timeline that I'd have to contribute it -- I might be able to get someone on my team to have a look.
References
No response
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: