simplehttp2server icon indicating copy to clipboard operation
simplehttp2server copied to clipboard

Installation fails when using yarn on FreeBSD Error: No binary for freebsd/x64

Open mirza-s opened this issue 7 years ago • 1 comments

When invoking yarn global add preact-cli

The installation of simplehttp2server dependency fails with Error: No binary for freebsd/x64

error /usr/local/share/.config/yarn/global/node_modules/simplehttp2server: Command failed.
Exit code: 1
Command: node lib/install.js
Arguments: 
Directory: /usr/local/share/.config/yarn/global/node_modules/simplehttp2server
Output:
/usr/local/share/.config/yarn/global/node_modules/simplehttp2server/lib/suffix.js:17
      throw new Error(`No binary for ${process.platform}/${process.arch}`);
      ^

Error: No binary for freebsd/x64
    at module.exports (/usr/local/share/.config/yarn/global/node_modules/simplehttp2server/lib/suffix.js:17:13)
    at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/simplehttp2server/lib/index.js:9:38)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
    at Module.require (internal/modules/cjs/loader.js:650:17)

node v10.5.0 yarn 1.7.0 npm 6.0.1 FreeBSD 11.2-RELEASE #0 r335510

mirza-s avatar Jul 14 '18 12:07 mirza-s

The problem seems to be the simplehttp2server is just a wrapper around Googles simplehttp2server and they don't provide executable for freebsd... see: https://github.com/GoogleChromeLabs/simplehttp2server/releases So either someone has to fix that, or preact has to move to the http2 support in Node (v8.4.0 and later, see https://nodejs.org/api/http2.html).

digitalica avatar Nov 25 '18 00:11 digitalica