-
Notifications
You must be signed in to change notification settings - Fork 78
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
@saleforce/cli not installable in environments that control npm versions #2327
Comments
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. |
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! |
Hey @hungrypipo, I just want to make sure I understand the problem: Your company restricts you from downloading any |
Yes correct, we only get npm packaged with node releases that they approve and make available and all other artifacts from npm are also controlled via artifact infrastructure. |
Gotcha, thanks. I have a few ideas on how we could to resolve this, going to run it by the team. I'll get back to ya |
Please and thank you, it would help a lot of people |
@hungrypipo Could you please clarify something for me
Do you have blanket approval on the LTS version of Node? Or do you have to get approval for specific semver versions of Node. For example: Today LTS is |
We get an approved version not directly the LTS that node releases that day. So right now LTS is 18.17.0 we are on 18.16.1 |
Are you able to download the CLI tarballs? They have deps bundled and would not require an npm install. |
No because we can't install from external sources. We use NPM because with the artifact management system we can request artifacts to be procured to it but it breaks now because of the NPM artifact being blocked. |
Gotcha, I didn't figure. Well, this is a bit tricky since you do not have blanket approval on all versions on Node LTS. If you did, my thought was that we could create a Github Action (cron) to do the following on
However this would continually bump the Could you please try a potential work around? Create a directory and add this {
"name": "npm-test",
"version": "1.0.0",
"dependencies": {
"@salesforce/cli": "2.1.7"
},
"overrides": {
"npm": "9.5.1"
}
} Testing this locally, running |
Oh nice will try and let you know! Thanks! |
You'll have to play around with that a little bit. You might be able to put that For me, that is Otherwise, you would just need to make sure the installed Afterward, run |
Ok so if I do a local (not global) install of @salesforce/cli the override trick works Also your fix you mentioned, trying to understand, I know we don't get blanket approval of all LTS versions but wouldn't your process create versions that aligned to LTS versions. Like if your GitHub action was in place there would be a version of the cli that aligns with each LTS version, we would just install the one we are on. Which would be a huge improvement to what we have now |
I guess what I'm asking, could you do the Github Action (cron) to make the LTS aligned versions? |
Cool, glad that the overrides (sorta) works. Yea, that would be the idea. It would always be a version of I suppose worst case, if there was a CLI bug fix that you really needed you could do the override trick or ask your IT department to approve the |
Yeah but you would build up a library of LTS versions so once we got to that LTS we could use the artifact. |
Yep, understood, I think were saying the same things 😁 I'll get a ticket created and try to get to it soon, I'll be out most of next week. Have a great weekend @hungrypipo! |
This issue has been linked to a new work item: W-13848117 |
Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments. |
Curious how I can track this workitem/feature? Why was the feature tag removed? |
@iowillhoit can you help me understand what the state of this issue is? |
This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted. |
@iowillhoit can you help me understand what the state of this issue is? |
Hey @hungrypipo, sorry I've been OOO a bit and we've had some priority changes. I am going to work on this today. |
@hungrypipo The workflow is in place that will update the As we discussed, this will ensure that the included If by chance this |
@iowillhoit Thank you! |
Just tested this nightly build 2.8.8 npm as expected! npm@9.6.7 |
Awesome! Glad it's working for ya 🎉 |
The latest @salesforce/cli (v 2.1.7 at this time) is not installable in our environment because two dependencies request non-standard npm versions(ones that do not come packaged with NodeJS versions)
@oclif/plugin-plugins@3.1.6
--- npm@9.8.0
@salesfoce/plugin-trust@2.4.32
--- npm@8.19.4
We have NodeJS 18.16.1 with npm 9.5.1, we are not allowed to pull npm as an artifact so the install fails
I also understand that the dependencies are managed by dependabot which automatically bumps the versions
Would it be possible to stop dependabot on the npm dependency for these 2 dependencies and make sure the npm version aligns with NodeJS packages?
The text was updated successfully, but these errors were encountered: