Skip to content
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

"Invalid 'main' field" warning #270

Closed
Piedone opened this issue Nov 29, 2022 · 3 comments
Closed

"Invalid 'main' field" warning #270

Piedone opened this issue Nov 29, 2022 · 3 comments
Labels
backlog Planned for future

Comments

@Piedone
Copy link

Piedone commented Nov 29, 2022

I get the following warning when running the action:

(node:4284) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/runner/work/_actions/azure/webapps-deploy/016bdd3f9b7cec60310bcf9da98f671628795644/node_modules/actions-secret-parser/package.json' of 'lib/index.js'. Please either fix that or report it to the module author
@shpraka shpraka added backlog Planned for future and removed need-to-triage labels Dec 7, 2022
@Nicolai-Bak
Copy link

Had the same issue when trying to deplay an ASP.NET 6 api. Problem was solved by updating actions/checkout@v2 and actions/setup-dotnet@v1 to actions/checkout@v3 and actions/setup-dotnet@v3

@oshihirii
Copy link

Had same issue now when using:

uses: actions/checkout@v3
uses: actions/setup-node@v3
uses: actions/upload-artifact@v3
uses: actions/download-artifact@v3

(node:2310) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/runner/work/_actions/azure/webapps-deploy/v2/node_modules/actions-secret-parser/package.json' of 'lib/index.js'. Please either fix that or report it to the module author
(Use node --trace-deprecation ... to show where the warning was created)
Package deployment using ZIP Deploy initiated.

My full workflow file is below incase it helps with troubleshooting:

# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy Node.js app to Azure Web App - <app-name-here>

on:
  push:
    branches:
      - main
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: Set up Node.js version
        uses: actions/setup-node@v3
        with:
          node-version: '18.x'

      - name: npm install, build, and test
        run: |
          npm install
          npm run build --if-present
          npm run test --if-present

      - name: Upload artifact for deployment job
        uses: actions/upload-artifact@v3
        with:
          name: node-app
          path: .

  deploy:
    runs-on: ubuntu-latest
    needs: build
    environment:
      name: 'Production'
      url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

    steps:
      - name: Download artifact from build job
        uses: actions/download-artifact@v3
        with:
          name: node-app

      - name: 'Deploy to Azure Web App'
        id: deploy-to-webapp
        uses: azure/webapps-deploy@v2
        with:
          app-name: '<app-name-here>'
          slot-name: 'Production'
          publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_<********> }}
          package: .

@shpraka
Copy link
Contributor

shpraka commented Jan 2, 2023

This has been fixed as part of #280, will be rolled out in next release.

@shpraka shpraka closed this as completed Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Planned for future
Projects
None yet
Development

No branches or pull requests

4 participants