Skip to content

Error: The package "esbuild-linux-64" could not be found, and is needed by esbuild #1646 #5187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
7 tasks done
zeromancer opened this issue Oct 4, 2021 · 5 comments
Closed
7 tasks done
Labels
bug: upstream Bug in a dependency of Vite

Comments

@zeromancer
Copy link

Describe the bug

Installation Error on yarn install

Error happens with npm as well, but only throws on npm run dev

I opened a Bug Report within ESbuild as well
evanw/esbuild#1646

But after some thought,
it seems to be a vitejs error,
because I can install esbuild separately (with either npm or yarn) without any errors.

Global Installation of (yarn global, or npm -g) esbuild is not recognized.
Logs of successful global esbuild installation

```sh yarn global add esbuild yarn global v1.22.5 warning package.json: No license field [1/4] Resolving packages... [2/4] Fetching packages... info [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The CPU architecture "x64" is incompatible with this module. info [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The CPU architecture "x64" is incompatible with this module. info [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The CPU architecture "x64" is incompatible with this module. info [email protected]: The CPU architecture "x64" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The CPU architecture "x64" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The CPU architecture "x64" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The CPU architecture "x64" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The CPU architecture "x64" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The CPU architecture "x64" is incompatible with this module. info [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The CPU architecture "x64" is incompatible with this module. [3/4] Linking dependencies... [4/4] Building fresh packages... warning Your current version of Yarn is out of date. The latest version is "1.22.15", while you're on "1.22.5". info To upgrade, run the following command: $ sudo apt-get update && sudo apt-get install yarn success Installed "[email protected]" with binaries: - esbuild Done in 0.75s.

</details>

### Reproduction

```sh
git clone https://github.com/christopher-caldwell/vite-material-ui
yarn install

System Info

System:
    OS: Linux 5.10 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
    Memory: 12.15 GB / 30.90 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 16.10.0 - /usr/bin/node
    Yarn: 1.22.5 - /usr/bin/yarn
    npm: 7.24.0 - /usr/bin/npm
  Browsers:
    Chrome: 94.0.4606.61
    Firefox: 78.14.0esr
  npmPackages:
    @vitejs/plugin-react-refresh: ^1.3.2 => 1.3.6 
    vite: ^2.1.5 => 2.6.2

Used Package Manager

yarn

Logs

yarn install v1.22.5
warning package.json: No license field
info No lockfile found.
warning [email protected]: No license field
[1/4] Resolving packages...
warning react-scripts > [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
warning react-scripts > webpack-dev-server > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning react-scripts > webpack-dev-server > chokidar > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning react-scripts > @pmmmwh/react-refresh-webpack-plugin > native-url > [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning react-scripts > webpack-dev-server > url > [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning react-scripts > webpack-dev-server > sockjs > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
warning react-scripts > webpack-dev-server > webpack-log > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
warning react-scripts > workbox-webpack-plugin > workbox-build > [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/[email protected]: Switch to 'npm install joi'
warning react-scripts > webpack > watchpack > watchpack-chokidar2 > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning react-scripts > babel-jest > @jest/transform > jest-haste-map > [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
warning react-scripts > postcss-preset-env > postcss-color-functional-notation > postcss-values-parser > [email protected]: flatten is deprecated in favor of utility frameworks such as lodash.
warning react-scripts > resolve-url-loader > rework > css > [email protected]: Please see https://github.com/lydell/urix#deprecated
warning react-scripts > webpack > micromatch > snapdragon > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: Moved to 'npm install @sideway/address'
warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/topo > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning react-scripts > webpack > micromatch > snapdragon > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
warning react-scripts > workbox-webpack-plugin > workbox-build > strip-comments > babel-plugin-transform-object-rest-spread > babel-runtime > [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The CPU architecture "x64" is incompatible with this module.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The CPU architecture "x64" is incompatible with this module.
info [email protected]: The CPU architecture "x64" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The CPU architecture "x64" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The CPU architecture "x64" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The CPU architecture "x64" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The CPU architecture "x64" is incompatible with this module.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The CPU architecture "x64" is incompatible with this module.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The CPU architecture "x64" is incompatible with this module.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The CPU architecture "x64" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
warning [email protected]: The engine "vscode" appears to be invalid.
[3/4] Linking dependencies...
warning " > @caldwell619/[email protected]" has unmet peer dependency "next@>=11".
warning "@emotion/styled > @emotion/[email protected]" has unmet peer dependency "@babel/core@^7.0.0".
warning "@emotion/styled > @emotion/babel-plugin > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
[4/4] Building fresh packages...
[-/5] ⡀ waiting...
[-/5] ⡀ waiting...
[-/5] ⡀ waiting...
[-/5] ⡀ waiting...
error /home/david/Develop/test/vite-mui-christoper-caldwell/node_modules/esbuild: Command failed.
Exit code: 1
Command: node install.js
Arguments: 
Directory: /home/david/Develop/test/vite-mui-christoper-caldwell/node_modules/esbuild
Output:
/home/david/Develop/test/vite-mui-christoper-caldwell/node_modules/esbuild/install.js:45
      throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild.
      ^

Error: The package "esbuild-linux-64" could not be found, and is needed by esbuild.

If you are installing esbuild with npm, make sure that you don't specify the
"--no-optional" flag. The "optionalDependencies" package.json feature is used
by esbuild to install the correct binary executable for your current platform.
    at binPathForCurrentPlatform (/home/david/Develop/test/vite-mui-christoper-caldwell/node_modules/esbuild/install.js:45:13)
    at Object.<anonymous> (/home/david/Develop/test/vite-mui-christoper-caldwell/node_modules/esbuild/install.js:90:15)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)

Validations

@zeromancer
Copy link
Author

seems to happen with windows as well
The package "esbuild-windows-64" could not be found
evanw/esbuild#1646 (comment)

@ilkka
Copy link

ilkka commented Oct 5, 2021

Just hit this too in our CI, and for anyone who wants a quick-but-real-dirty workaround, replacing your npm install with npm install esbuild works because then the optional dependecy to esbuild-* gets satisfied.

@ddahan
Copy link

ddahan commented Oct 5, 2021

As a quick "workaround", I reverted to the 2.5.* version.

@Shinigami92
Copy link
Member

@Shinigami92 Shinigami92 added bug: upstream Bug in a dependency of Vite and removed pending triage labels Oct 5, 2021
@zeromancer
Copy link
Author

I tried it with yarn add -D [email protected]
and it works!
@Shinigami92 thanks for the workaround!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: upstream Bug in a dependency of Vite
Projects
None yet
Development

No branches or pull requests

4 participants