Skip to content

Commit ce9ce35

Browse files
authored
Update azure-webapps-node.yml
1 parent 33264a5 commit ce9ce35

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/azure-webapps-node.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,19 @@ jobs:
1515
- name: Setup Node.js
1616
uses: actions/setup-node@v4
1717
with:
18-
node-version: '18.x' # Match Azure App Service Node version
18+
node-version: '20.x' # Upgrade to Node 20 to support all dependencies
1919
cache: 'npm'
2020

21-
- name: Install dependencies and build
21+
- name: Clean install dependencies
2222
run: |
23-
npm ci
24-
npm run build
23+
# Clean npm cache and remove lock file to fix rollup issue
24+
npm cache clean --force
25+
rm -f package-lock.json
26+
rm -rf node_modules
27+
npm install
28+
29+
- name: Build application
30+
run: npm run build
2531

2632
- name: Create production package.json for Azure
2733
run: |
@@ -30,8 +36,8 @@ jobs:
3036
"name": "porfolio-production",
3137
"version": "1.0.0",
3238
"engines": {
33-
"node": "18.x",
34-
"npm": "9.x"
39+
"node": "20.x",
40+
"npm": "10.x"
3541
},
3642
"scripts": {
3743
"start": "serve -s . -p $PORT"
@@ -50,8 +56,6 @@ jobs:
5056
# Verify serve installation
5157
echo "Verifying serve installation:"
5258
npx serve --version
53-
echo "Package.json content:"
54-
cat package.json
5559
5660
- name: Upload artifact
5761
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)