Problem with Azure static website -> ReactJS library/dependency issue

Malcolm Liljedahl 21 Reputation points
2022-04-15T16:52:46.787+00:00

Hey, so I got an "Azure static website" which have worked properly until now. My plan is to use the ReactJS auzre-library to get my blob storage images which works fine locally, but when I try to push my code up to the static website it sometimes doesn't finish the build. it gives me this message:193458-chrome-4mlhpcesot.png

But sometimes it does finish the build but then it won't render anything at all. Do you know a solution of this? I guess that it has to do with the "Azure Static Website" not being able to find the azure reactJS library ?I got all my libraries in a node_module map which is in my gitignore list because of it's size
so I can't really push the whole node_module app because its to big, so github wont let me.

So my conclusion is that it seems like for me to be able to do what I want I need my "Azure static web app" to be able to reach my @azure libraries which are inside my node_modules folder which isn't being pushed.

I've tried to:

1) Remove the azure dependency from my gitigore file.
2) Trying to run a npm install for the dependency in my workflow file

But it didn't do any difference.

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
851 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Malcolm Liljedahl 21 Reputation points
    2022-04-21T19:16:44.103+00:00

    Ok, so after a lot of investigation I believe that the problem isn't the connection to Azure it's more a problem with the SDK config. I've now tried to follow this guide -> https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/Bundling.md but it seems like some parts isn't really covered.

    0 comments No comments