startbootstrap-one-page-wonder icon indicating copy to clipboard operation
startbootstrap-one-page-wonder copied to clipboard

Can't run build with github action

Open Tyvain opened this issue 3 years ago • 0 comments

I try to build a github CI like this:

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package

on:
  release:
    types: [created]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: 16
      - run: npm run build

But I get this error:

Error: Cannot find module 'shelljs'
Require stack:
- /home/runner/work/tyvain.github.io/tyvain.github.io/scripts/clean.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:[18](https://github.com/Tyvain/tyvain.github.io/runs/5314103267?check_suite_focus=true#step:4:18))
    at Object.<anonymous> (/home/runner/work/tyvain.github.io/tyvain.github.io/scripts/clean.js:1:12)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:8[22](https://github.com/Tyvain/tyvain.github.io/runs/5314103267?check_suite_focus=true#step:4:22):12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/runner/work/tyvain.github.io/tyvain.github.io/scripts/clean.js'
  ]

https://github.com/Tyvain/tyvain.github.io/runs/5314103267?check_suite_focus=true

Source: https://github.com/Tyvain/tyvain.github.io

Tyvain avatar Feb 24 '22 04:02 Tyvain