Giter VIP home page Giter VIP logo

Comments (11)

0gust1 avatar 0gust1 commented on August 14, 2024 1

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 azure/webapps-deploy step.

- name: HACK - copy symbolic link to directory (Azure & symbolic links...)
      working-directory: ./backend
      run: cp -Lr node_modules/dependency/symlinked node_modules/dependency/symlinked-COPY && rm node_modules/dependency/symlinked && mv node_modules/dependency/symlinked-COPY node_modules/dependency/symlinked

from webapps-deploy.

alper-batioglu avatar alper-batioglu commented on August 14, 2024 1

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.

  • name: rebuild
    run: npm rebuild

from webapps-deploy.

toy0605 avatar toy0605 commented on August 14, 2024

same issue here

from webapps-deploy.

aksm-ms avatar aksm-ms commented on August 14, 2024

@danechitoaie is the action passing successfully? Can you please send the workflow and detailed logs?

from webapps-deploy.

danechitoaie avatar danechitoaie commented on August 14, 2024

@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 node_modules/.bin are OK, after transferring the ZIP to Azure and unzipping the file the symbolic links are broken.

See this answer from here https://askubuntu.com/a/1203934/606393 I think this could be the solution to this problem.

The ZIP format supports storing the symbolic link. To store symbolic links as such, you can use the --symlinks option.

I haven't tested this, but it's a good lead to start from.

from webapps-deploy.

aksm-ms avatar aksm-ms commented on August 14, 2024

@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.
From your description of problem, it was unclear if the action passed/failed without proper logs.
Since action passes, looks like issue is at the backend APIs which we use, will look it and update.

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.

from webapps-deploy.

aksm-ms avatar aksm-ms commented on August 14, 2024

zip deploy is handled by backend ZIP deploy Kudu API. There is already an issue on Kudu repo tracking this - projectkudu/kudu#2946 .
Please follow up with symlinks related issues on Kudu repo since action is using the same for ZIP deploy.

from webapps-deploy.

reflash avatar reflash commented on August 14, 2024

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 azure/webapps-deploy step.

- name: HACK - copy symbolic link to directory (Azure & symbolic links...)
      working-directory: ./backend
      run: cp -Lr node_modules/dependency/symlinked node_modules/dependency/symlinked-COPY && rm node_modules/dependency/symlinked && mv node_modules/dependency/symlinked-COPY node_modules/dependency/symlinked

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)

from webapps-deploy.

carterm avatar carterm commented on August 14, 2024

npm install $(npm pack <folder> | tail -1)

https://stackoverflow.com/questions/21425980/npm-install-without-symlinks-option-not-working

from webapps-deploy.

aaronrogers avatar aaronrogers commented on August 14, 2024

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.

  • name: rebuild
    run: npm rebuild

I ran into this problem with my Azure DevOps pipeline. My quick and dirty solution was to add npm rebuild && ... to the beginning of my npm start command. There's probably a better way to deal with it, but I needed it done.

from webapps-deploy.

pkellyuk avatar pkellyuk commented on August 14, 2024

ths is still an issue

from webapps-deploy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.