-
Notifications
You must be signed in to change notification settings - Fork 115
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
Make yarn available as an alternative package manager or provide a way to install it. #42
Comments
+1 on that request. |
This was brought up awhile back in projectkudu/kudu#2176 but unfortunately their response was to use npm to install yarn 😕 In the end I moved all of my stuff over to build & package on appveyor and then deploy it via a zip file containing the ready to go site or functions. Azure/azure-functions-pack also helped simplify things a bit. |
Yep, I knew it had come up before but rather than poke at a long dead thread I thought I'd create a new one. Although npm 5 did drastically improve things yarn is still significantly better in terms of performance. Although I cannot find any numbers as to usage levels the github numbers suggest that yarn is just as popular, perhaps even more popular than NPM now. As for deployment I've taken a similar path to you using CircleCI, build everything there and zip deploy. I hadn't heard of the azure functions pack so thanks for that, I'll have a poke around. Although I must admit the engagement in the issues doesn't give me a feeling that it'll be part of long term support. |
Yarn is even more desirable on app services due to the frequent failure of npm on app services. For some reason it sometimes fails to install all packages, yet says "up to date". You have to manually force it to reinstall. I think its something to do with the local cache getting corrupted due to the slow storage. |
Was able to use yarn by following the code from this issue, combined with the repo it is in. " |
This is an approach using Linux App Services. |
@patricklee2 I created the PR above as we had an incident last week where the binaries installed via CircleCI and those required by Azure were different and our site broke. My thinking was lets get Yarn installed on Azure by default then I don't have to do that anymore. I started working on a branch in anticipation of the PR being merged in and got this. When did Yarn get added to the base image and why wasn't this thread updated? Edit |
I switched to yarn a while back, and eventually had to abandon it. The multi threaded downloads and installs overwhelmed the app service. It would lose all network ability and the install would time out. Edit: exactly what was posted above... Network timeouts. |
sigh Ok, lets see if we can get an official word from Microsoft on the matter. Edit. For any support people reading this, I've got ticket 119071822001841 open. |
If you're doing node on Windows app service, I'd recommend you jump ship early. Yarn is going to be the least of your problems. If you stay, make sure you log http errors in your CLIENTS, as they will get 500 errors that your server will never clue you in to, even with app insights. |
We're using Linux, and we're logging extensively via NewRelic and Loggly. We know every response leaving the host. In other news, I got it working!
@appsvc can I rely on this undocumented bit of yarn-ness? |
@phawxby @tony-gutierrez for AppService on Linux, we use Oryx Build System. Oryx now supports yarn. You could also try the default yarn builds on Kudu. For node based installations on Linux, we compress the node_modules after a build and store the name of this compressed archive as node_modules.zip in a manifest. This archive is then extracted during the run-time, we changed this behavior to ensure faster build times and optimize app start-up time as well. So the runtime images check for node_modules.zip in wwwroot but if it's any other archive in your app having a name other than this reserved name it should just work fine. Let us know if you face any issues. |
@sanchitmehta does this mean we're safe to use Yarn on app service? It's not going to disappear and break things? |
Working deploy.sh
|
added |
For those that stumble into my deployment script above and/or using their own Yarn deployment script, please be aware of this environment problem which could cause your deployments to misbehave. |
We use Yarn as the package manager of choice on all our applications. We're now trying to deploy our first application to Azure and have found Yarn is not available and there seems to be no easy way to install it.
Our application references other repo's via git submodules which also use Yarn so we cannot just switch back to npm and I don't think maintaining npm lock and a yarn lock files in parallel is a sensible idea.
Your competitors already support Yarn or provide an easy path to installing it.
https://devcenter.heroku.com/changelog-items/1065
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions.html
The text was updated successfully, but these errors were encountered: