nimatra
nimatra

Reputation: 614

Node-sass binding problem in Github-Actions

I'm setting up a GitHub action with following steps

runs-on: ubuntu-latest 
steps:
- uses: actions/checkout@master
- uses: borales/actions-yarn@master
  with:
    cmd: install # will run `yarn install` command
- uses: actions/setup-node@master
  with:
    node-version: '12.x'
- run: npm run build:prod

It crashes on building the app becuase of OS mismatch on Node Sass library

./node_modules/font-awesome-loader/font-awesome.config.js) Module build failed (from ./node_modules/sass-loader/dist/cjs.js): Error: Missing binding /home/runner/work/xxx/xxx/node_modules/node-sass/vendor/linux-x64-72/binding.node Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 12.x

Found bindings for the following environments: - Linux/musl 64-bit with Node.js 12.x

Running npm rebuild node-sass as a step causes errors since the agent does not have admin permissions.

Any idea why Github-Actions is giving me linux/musl instead of linux?

Upvotes: 1

Views: 1656

Answers (1)

nimatra
nimatra

Reputation: 614

The issue was with mixing yarn and npm. I was using yarn to install and npm to build. Doing both with yarn solved the problem.

Upvotes: 1

Related Questions