-
Notifications
You must be signed in to change notification settings - Fork 197
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
Deployed code messes up the symlinks and app can't start #54
Comments
same issue here |
Had same kind of issue too. In my case I have a dependency that is a symbolic link to another folder of the repo (it's a monorepo). Root cause may be linked to the App service sandbox model : https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#symbolic-link-creation I did a quick and dirty workaround in my github action, just before the
|
@danechitoaie is the action passing successfully? Can you please send the workflow and detailed logs? |
@aksm-ms Yes, the action was passing successfully. I've since then moved to Heroku so I can't reproduce or test this anymore but basically the build on GitHub actions side was fine and successful. Problem is that then the GH action was doing a ZIP of the files (node_modules included) and then transferring the zip to Azure and then unzipping them there. This operation messes with the "sym links - https://en.wikipedia.org/wiki/Symbolic_link". So on GitHub actions (before the ZIP process) the symbolic links from within See this answer from here https://askubuntu.com/a/1203934/606393 I think this could be the solution to this problem.
I haven't tested this, but it's a good lead to start from. |
@danechitoaie i understand the issue is with symlinks, i am trying to figure out if the action code is failing or failure is on app service platform side. Also, it would be great if you can share any workflow run related info to debug like link to your workflow run, downloaded logs, etc. |
zip deploy is handled by backend ZIP deploy Kudu API. There is already an issue on Kudu repo tracking this - projectkudu/kudu#2946 . |
Have you found any other solution since then? I'm facing the same problem with monorepo - my symlinks seem to be plain files with path to workspaces (but fail once node tries to import them) |
https://stackoverflow.com/questions/21425980/npm-install-without-symlinks-option-not-working |
I do not know what the current situation here is but I wanted to add just another dirty fix to this thread. you can run the action below just before azure/webapps-deploy, which also seems to do the trick for your symbolic links under "node_modules/.bin" folder.
|
I ran into this problem with my Azure DevOps pipeline. My quick and dirty solution was to add |
ths is still an issue |
I'm deploying a nodeJS app with Github actions and it seems that once the code gets to the azure web app server the symlinks from within node_modules/.bin folder are all messed up and app doesn't start.
For example when I run my code locally, if I do a
node ./node_modules/.bin/next --help
it works, and./node_modules/.bin/next
is actually a symlink to../next/dist/bin/next
But after code is deployed on Azure with the webapps-deploy action it seems that
./node_modules/.bin/next
is no longer a symlink to../next/dist/bin/next
but it actually becomes a text file with../next/dist/bin/next
as its contents and so if I connect to ssh to the Azure server and runnode ./node_modules/.bin/next --help
(same command I run locally, or that also works ok inside the GitHub action, there I get an error:The text was updated successfully, but these errors were encountered: