sfdx-scan-pull-request icon indicating copy to clipboard operation
sfdx-scan-pull-request copied to clipboard

ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING type error

Open ghost opened this issue 11 months ago • 2 comments

Hi, I am trying to install and run this package on my repo in my GH actions workflow. I keep getting the following error and I was wondering if it is something related to the latest versions of either this package or sfdx Code Analyzer. The error seems likely due to incompatibility with ESL lint.

tried so far:

  • using the newest sf commands instead of sfdx but that seems not supported yet
  • not specifying Node version and getting unsupported version error
  • using a different(classic) token where I only give full access to private repo
  • adding pmdconfig: masterRuleset.xml and adding that file in my repo
Screenshot 2024-12-10 at 14 42 54 Screenshot 2024-12-10 at 14 43 31

this is my current yml

name: Static Analysis
on:
  pull_request:
    branches: 
      - actionsLinter

jobs:
  analyze:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
    
      - name: Set up Node.js 20
        uses: actions/setup-node@v3
        with:
          node-version: '20'

      - name: Install SFDX CLI and Scanner
        run: |
          npm install sfdx-cli -g
          sfdx plugins:install @salesforce/sfdx-scanner@latest

      - name: Run SFDX Scanner - Report findings as comments
        uses: mitchspano/[email protected]
        with:
          pmdconfig: masterRuleset.xml
          severity-threshold: 4
          strictly-enforced-rules: '[{ "engine": "pmd", "category": "Performance", "rule": "AvoidDebugStatements" }]'
        env:
          GITHUB_TOKEN: ${{ secrets.TOKEN }}

      - name: Debug API Response
        run: echo "${{ steps.scan.outputs.check_run }}"
                  

please let me know if this could be an issue for the Code Analyzer instead.

ghost avatar Dec 10 '24 13:12 ghost

I think this is a node version thing. I believe the action runner comes with node 18 installed. Try omitting the setup node step and let me know if the problem persists.

mitchspano avatar Dec 10 '24 13:12 mitchspano

I think this is a node version thing. I believe the action runner comes with node 18 installed. Try omitting the setup node step and let me know if the problem persists.

Thanks for the sweep reply. I initially had no node setup step specifying the version and the error was the following: The engine "node" is incompatible with this module. Expected version ">=20.0.0". Got "18.20.5"

Screenshot 2024-12-10 at 16 40 53
name: Static Analysis
on:
  pull_request:
    branches: 
      - actionsLinter

jobs:
  analyze:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
          
      - name: Install SFDX CLI and Scanner
        run: |
          npm install sfdx-cli -g
          sfdx plugins:install @salesforce/sfdx-scanner@latest

      - name: Run SFDX Scanner - Report findings as comments
        uses: mitchspano/[email protected]
        with:
          pmdconfig: masterRuleset.xml
          severity-threshold: 4
          strictly-enforced-rules: '[{ "engine": "pmd", "category": "Performance", "rule": "AvoidDebugStatements" }]'
        env:
          GITHUB_TOKEN: ${{ secrets.TOKEN }}

      - name: Debug API Response
        run: echo "${{ steps.scan.outputs.check_run }}"
                  

ghost avatar Dec 10 '24 15:12 ghost