Guidance needed: GitHub to Azure deployment of static web app with private npm dependencies #1493
Unanswered
v-sreekanth-a
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to deploy a Static Web App from GitHub to Azure using the Azure/static-web-apps-deploy@v1 action. However, the deployment fails when I attempt to use a licensed npm package. The action does not seem to accept the license credentials for the private npm registry. How can I properly configure the GitHub Actions workflow to use the licensed npm package and successfully deploy the Static Web App to Azure?
Below is the yaml file:
`name: Azure Static Web Apps CI/CD
on:
push:
branches:
- dev
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- dev
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
action: "close"
`
When I run the workflow, I encounter the following error:
`npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@infragistics%2figniteui-react - Not found
npm ERR! 404
npm ERR! 404 '@infragistics/igniteui-react@^18.6.0' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in: /github/home/.npm/_logs/2024-06-10T09_31_49_347Z-debug-0.log
---End of Oryx build logs---
Oryx has failed to build the solution.
`
Beta Was this translation helpful? Give feedback.
All reactions