GitHub Actions install error: Failed to find package "@netlify/esbuild-linux-64"




One of our CI checks in GitHub Actions is a basic ‘does the app install work?’, which runs npm ci.

In my newest PR, this action is failing and I don’t think it’s because of anything I’ve changed. Netlify’s preview deploys are all fine, and npm ci works locally.

Our dependencies:

"dependencies": {
  "@britishredcrosssociety/brc-component-library": "0.78.0",
  "@kontent-ai/delivery-node-parser": "3.1.0",
  "@kontent-ai/delivery-sdk": "12.4.3",
  "@kontent-ai/model-generator": "5.10.0",
  "@kontent-ai/smart-link": "3.0.0",
  "@kontent-ai/webhook-helper": "2.0.1",
  "@netlify/plugin-lighthouse": "4.1.1",
  "@netlify/plugin-nextjs": "4.36.0",
  "@types/lodash.camelcase": "4.3.7",
  "@types/lodash.upperfirst": "4.3.7",
  "@types/node": "18.15.11",
  "@types/react": "18.0.32",
  "@typescript-eslint/eslint-plugin": "5.57.0",
  "@typescript-eslint/parser": "5.57.0",
  "autoprefixer": "10.4.14",
  "cssnano": "6.0.0",
  "eslint": "8.36.0",
  "eslint-config-airbnb-base": "15.0.0",
  "eslint-config-airbnb-typescript": "17.0.0",
  "eslint-config-next": "13.2.4",
  "eslint-config-prettier": "8.8.0",
  "eslint-plugin-import": "2.27.5",
  "eslint-plugin-jest": "27.2.1",
  "eslint-plugin-jest-dom": "4.0.3",
  "eslint-plugin-jest-formatting": "3.1.0",
  "eslint-plugin-jsx-a11y": "6.7.1",
  "eslint-plugin-prettier": "4.2.1",
  "eslint-plugin-react": "7.32.2",
  "eslint-plugin-react-hooks": "4.6.0",
  "eslint-plugin-simple-import-sort": "10.0.0",
  "eslint-plugin-tailwindcss": "3.11.0",
  "eslint-plugin-testing-library": "5.10.2",
  "eslint-plugin-unused-imports": "2.0.0",
  "fs-extra": "11.1.1",
  "husky": "8.0.3",
  "lodash.camelcase": "4.3.0",
  "lodash.upperfirst": "4.3.1",
  "micro": "10.0.1",
  "next": "13.2.4",
  "next-seo": "6.0.0",
  "node-fetch": "3.3.1",
  "postcss": "8.4.21",
  "react": "18.2.0",
  "react-dom": "18.2.0",
  "tailwindcss": "3.3.1",
  "typescript": "5.0.3"
"devDependencies": {
  "@commitlint/cli": "17.5.1",
  "@commitlint/config-conventional": "17.4.4",
  "@next/bundle-analyzer": "12.3.4",
  "@testing-library/jest-dom": "5.16.5",
  "@testing-library/react": "14.0.0",
  "@types/jest": "29.5.0",
  "commitizen": "4.3.0",
  "cross-env": "7.0.3",
  "cypress": "11.2.0",
  "cz-conventional-changelog": "3.3.0",
  "dotenv": "16.0.3",
  "jest": "29.5.0",
  "jest-environment-jsdom": "29.5.0",
  "lint-staged": "13.2.0",
  "netlify-plugin-cypress": "2.2.1",
  "npm-run-all": "4.1.5",
  "prettier": "2.8.7",
  "rimraf": "4.4.1",
  "start-server-and-test": "2.0.0",
  "ts-jest": "29.1.0"

Action log:

Run npm ci
npm WARN deprecated intl-messageformat-parser@1.8.1: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (
npm WARN deprecated urix@0.1.0: Please see
npm WARN deprecated source-map-resolve@0.5.3: See
npm WARN deprecated source-map-url@0.4.1: See
npm WARN deprecated resolve-url@0.2.1:
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated puppeteer@18.1.0: < 19.4.0 is no longer supported
npm ERR! code 1
npm ERR! path /home/runner/work/web-platform/web-platform/node_modules/@netlify/esbuild
npm ERR! command failed
npm ERR! command sh -c -- node install.js
npm ERR! [esbuild] Failed to find package "@netlify/esbuild-linux-64" on the file system
npm ERR! 
npm ERR! This can happen if you use the "--no-optional" flag. The "optionalDependencies"
npm ERR! package.json feature is used by esbuild to install the correct binary executable
npm ERR! for your current platform. This install script will now attempt to work around
npm ERR! this. If that fails, you need to remove the "--no-optional" flag to use esbuild.
npm ERR! 
npm ERR! node:internal/modules/cjs/loader:1026
npm ERR!   const err = new Error(message);
npm ERR!               ^
npm ERR! 
npm ERR! Error: Cannot find module 'esbuild'
npm ERR! Require stack:
npm ERR! - /home/runner/work/web-platform/web-platform/node_modules/@netlify/esbuild/install.js
npm ERR!     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1026:15)
npm ERR!     at Function.resolve (node:internal/modules/cjs/helpers:114:19)
npm ERR!     at downloadedBinPath (/home/runner/work/web-platform/web-platform/node_modules/@netlify/esbuild/install.js:86:46)
npm ERR!     at checkAndPreparePackage (/home/runner/work/web-platform/web-platform/node_modules/@netlify/esbuild/install.js:232:15)
npm ERR!     at Object.<anonymous> (/home/runner/work/web-platform/web-platform/node_modules/@netlify/esbuild/install.js:247:1)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1196:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:1074:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:909:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
npm ERR!   code: 'MODULE_NOT_FOUND',
npm ERR!   requireStack: [
npm ERR!     '/home/runner/work/web-platform/web-platform/node_modules/@netlify/esbuild/install.js'
npm ERR!   ]
npm ERR! }

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2023-04-27T11_11_50_893Z-debug-0.log
Error: Process completed with exit code 1.
1 Like

Hi @kmcguire,

This has been responded to in the helpdesk.

Can you please provide the link to the helpdesk answer?

Hi @notes,

The response - and the ‘solution’ - was essentially just a recommendation not to generate package-lock.json from a Windows machine if you’re going to commit it and run it in Linux environments.

It doesn’t feel like a great solution, to be honest, more of a workaround, but if there’s nothing then they can do then that’s that.