@Salesforce/cli not installable when npm artifact is not allowed, can it use the system npm instead #2585
Replies: 9 comments 4 replies
-
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
Beta Was this translation helpful? Give feedback.
-
Hello @hungrypipo 👋 It looks like you didn't include the full Salesforce CLI version information in your issue. A few more things to check:
Thank you! |
Beta Was this translation helpful? Give feedback.
-
Hello @hungrypipo, did the fix that we implemented for you not work? #2327 FWIW: We used to use the system We may explore this (if for no other reason than reducing our bundle size) but it is not on our immediate roadmap. |
Beta Was this translation helpful? Give feedback.
-
Hi @iowillhoit nice to chat with you again. Unfortunately I thought matching the npm to the NodeJS would be enough but our company keeps the npm artifact out of our artifact repository(it's blocked) we don't hit the npmjs repo. Now that the npm matches the NodeJS LTS we don't have to do overrides if we install local instead of global, I know you mentioned installing as local in the previous issue, wondering what the side effects of that are? Does it still work with VSCode? Do I just need to add it to the path? |
Beta Was this translation helpful? Give feedback.
-
@iowillhoit for the npm version in the two plugins I notice it's set to a specific version and not to a specific version and higher. Just wondering if you could make that tweak? Because if we're at a NodeJS LTS version and they push an update to the next NodeJS LTS it will force us to update the CLI right away. We use the CLI in Jenkins pipelines so it installs the CLI on each run of the pipeline, those would break till we procured the next CLI version into our artifact repo. |
Beta Was this translation helpful? Give feedback.
-
Hey @hungrypipo, I think as long as your locally installed I am not sure I am following your second comment. Even if we added a FWIW, I did discuss this with the team. We created an exploratory ticket to look into how feasible it would be to optionally install |
Beta Was this translation helpful? Give feedback.
-
@iowillhoit 👋 might be slightly related, but installing the Salesforce CLI and then running mkdir temp-project
cd temp-project
npm init -y
npm i @salesforce/cli
npm update Will make Arborist choke up:
Here's the JS stack associated:
Most NPM commands that need to reify the actual tree are likely to fail :/ To rule out my env, I run the exact script mentioned above in a GHA, and see the same issue: https://github.com/louis-bompart/shiny-disco |
Beta Was this translation helpful? Give feedback.
-
Hey @louis-bompart, that is a different issue than what were discussing here. At a glance I am not sure what is going on there. However, we don't recommend installing |
Beta Was this translation helpful? Give feedback.
-
@iowillhoit The reason for this, is because they will update NodeJS on our machines which will update the npm version, so when that happens I don't want to not able to be able to install the specific sf-cli we're using. The sf-cli installs on each Jenkins run. |
Beta Was this translation helpful? Give feedback.
-
Our company releases NodeJS LTS versions with packaged npm version. And block the npm artifact itself. Is it possible to make the two dependencies that require the npm artifact use the system level npm that comes with NodeJS instead of pulling the npm artifact as a dependency?
Beta Was this translation helpful? Give feedback.
All reactions