Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/npm-grunt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: NodeJS with Grunt

on:
push:
branches: [ "canary" ]
pull_request:
branches: [ "canary" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Build
run: |
npm install
grunt
Comment on lines +26 to +28
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow might fail because it doesn't install the Grunt CLI before running the grunt command. Consider either:

  1. Adding npm install -g grunt-cli before the grunt command:

    run: |
      npm install
      npm install -g grunt-cli
      grunt
    
  2. Or using npx to run the locally installed grunt:

    run: |
      npm install
      npx grunt
    

Alternatively, ensure grunt-cli is included in the project's package.json dependencies.

Suggested change
run: |
npm install
grunt
run: |
npm install
npx grunt

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Comment on lines +25 to +28
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: Build
run: |
npm install
grunt
- name: Setup corepack
run: |
npm i -g [email protected]
corepack enable
- name: Build
run: |
pnpm install
pnpm build

The workflow attempts to run npm install and grunt, but this repository uses pnpm as its package manager and does not have Grunt configured. This workflow will fail on every execution.

View Details

Analysis

GitHub Actions workflow uses wrong package manager and nonexistent build tool

What fails: .github/workflows/npm-grunt.yml runs npm install and grunt commands, but this repository uses [email protected] (specified in package.json line 311) and has no Grunt configuration.

How to reproduce:

# Check package manager configuration
grep packageManager package.json  # Shows "[email protected]"
ls -la | grep lock                 # Only pnpm-lock.yaml exists

# Verify no Grunt
find . -name "Gruntfile.*"         # No results
grep -i grunt package.json         # No grunt dependencies
grunt                              # Command not found (exit 127)

Result: The workflow would fail at both steps:

  • npm install ignores pnpm-lock.yaml and creates inconsistent dependencies
  • grunt command fails with "command not found"

Expected: All other workflows in .github/workflows/ use corepack to enable pnpm, then run pnpm install and pnpm build (see build_and_deploy.yml, test_examples.yml, etc.)

Fix: Updated workflow to use corepack + pnpm and replace grunt with pnpm build to match repository patterns.

Loading