-
Notifications
You must be signed in to change notification settings - Fork 58
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
How to update npm used for Oryx? #694
Comments
@william-msft is it possible to control the NPM version, perhaps using the |
+1. As of now, create-react-app is creating the lockfile with "lockfileVersion": 2. |
Hi @anthonychu, specifying npm's version in the |
Yes we need some way to specify the npm version. Not really sure what’s the best thing to do here. @simonaco @Reshmi-Sriram |
Thanks Anthony, we have a work item for this cc: @daniv-msft |
@simonaco @anthonychu @Reshmi-Sriram -- wanted to double check how feasible the below solution may be from the Static Web Apps side: As mentioned above, our images have From the SWA GitHub Action, I can see in the I'm not sure about the other mechanisms for deploying SWAs (Azure Portal, VS Code, CLI, etc.), but wherever a container is using the Oryx build image and we have the ability to set environment variables within the container, we should be OK to set this Does this sound like a feasible solution or is there another route we'd like to take? We can keep investigating from the Oryx side for other ways to support this if needed. |
@simonaco @anthonychu @Reshmi-Sriram -- as an update: Oryx just released an update to our CLI that now supports detecting the For example, if the user has the following in their
Oryx will add a snippet to the build script generated that runs |
Thanks @cormacpayne - I ended up blogging this approach here (using node rather than npm) https://blog.johnnyreilly.com/2022/05/28/azure-static-web-apps-node-16-oryx |
Can we close this issue as resolved? @Reshmi-Sriram |
Feel free to re-open in case of further discussions! |
On every single build, we receive the following warning:
While the build succeeds, I would rather be able to update the npm version that Oryx uses to the latest.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I think I understand why keeping an older npm version on Oryx makes sense (for those projects with older npm versions and lockfile versions), but I would like to be able to upgrade the version used for my builds.
Additional context
I have tried adding a step to the job containing
npm install -g npm@latest
. That command executes successfully, but it doesn't affect the npm version used in Oryx, which is 6.14.15.The text was updated successfully, but these errors were encountered: