11

When I run npm ci on Github Actions I got the error:

Run npm ci
npm ERR! bindings not accessible from watchpack-chokidar2:fsevents

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2021-09-17T15_18_42_465Z-debug.log
Error: Process completed with exit code 1.

What can be?

My .github/workflows/eslint.yaml

name: ESLint

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Use Node.js
        uses: actions/setup-node@v1
        with:
          node-version: '14.x'
      - run: npm ci
      - run: npm run lint

My package.json

{
  "name": "@blinktrade/uikit",
  "version": "1.0.0",
  "main": "dist/index.js",
  "license": "MIT",
  "devDependencies": {
    "@babel/plugin-transform-react-jsx": "^7.14.9",
    "@babel/preset-env": "^7.15.6",
    "@babel/preset-react": "^7.14.5",
    "@babel/preset-typescript": "^7.15.0",
    "@storybook/addon-essentials": "^6.3.8",
    "@storybook/react": "^6.3.8",
    "@testing-library/jest-dom": "^5.14.1",
    "@testing-library/react": "^12.1.0",
    "@testing-library/user-event": "^13.2.1",
    "@types/jest": "^27.0.1",
    "@types/react": "^17.0.21",
    "@typescript-eslint/eslint-plugin": "^4.31.1",
    "@typescript-eslint/parser": "^4.31.1",
    "eslint": "^7.32.0",
    "eslint-plugin-react": "^7.25.2",
    "husky": "^7.0.2",
    "jest": "^27.2.0",
    "prettier": "^2.4.1",
    "pretty-quick": "^3.1.1",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "rimraf": "^3.0.2",
    "typescript": "^4.4.3"
  },
  "husky": {
    "hooks": {
      "pre-push": "npm run lint",
      "pre-commit": "pretty-quick --staged"
    }
  },
  "scripts": {
    "build": "tsc -p .",
    "clear": "rimraf dist/",
    "format": "prettier '**/*' --write --ignore-unknown",
    "lint": "eslint --max-warnings=0 .",
    "storybook": "start-storybook -p 4000",
    "test": "jest"
  }
}

5 Answers 5

10

Solved removing packages-lock.json and running again using NodeJS 14 (was 10)

1
  • In my case, it worked fine when I used the node version specified in .nvmrc file
    – NiroshanJ
    Nov 16 at 10:10
3

The actions/setup-node@v1 must have the same version in GitHub actions and local environment where the package-lock.json has been built. In my case, the GitHub actions point to node 14.

      - uses: actions/setup-node@v1
        with:
          node-version: "14"

After changing it to 16 - the same I have on the local environment - it fixes the problem.

1

In my case my tests suddenly started failing despite having worked for a while and despite node_version matching my local Node version, weirdly. Simply updating this to 16 in my GitHub Action workflow fixed the issue and causes tests to start running again:

steps:
  - uses: actions/checkout@v3
  - uses: actions/setup-node@v3
    with:
      node-version: 16
0

For me helped update of node version

0

at Build image settings I added "Node.js version 16.15" package. it helped me!

1
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Apr 29, 2022 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.