Preact-cli: Encountered issues during global install

Created on 20 May 2017  ·  4Comments  ·  Source: preactjs/preact-cli

 ❯ npm i -g preact-cli
/Users/rcamara/.nvm/versions/node/v6.9.1/bin/preact -> /Users/rcamara/.nvm/versions/node/v6.9.1/lib/node_modules/preact-cli/lib/index.js

> [email protected] install /Users/rcamara/.nvm/versions/node/v6.9.1/lib/node_modules/preact-cli/node_modules/fsevents
> node install

[fsevents] Success: "/Users/rcamara/.nvm/versions/node/v6.9.1/lib/node_modules/preact-cli/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

> [email protected] postinstall /Users/rcamara/.nvm/versions/node/v6.9.1/lib/node_modules/preact-cli/node_modules/simplehttp2server
> node lib/install.js

  ⚠ The `/Users/rcamara/.nvm/versions/node/v6.9.1/lib/node_modules/preact-cli/node_modules/simplehttp2server/vendor/simplehttp2server` binary doesn't seem to work correctly
  ⚠ simplehttp2server pre-build test failed
  ℹ compiling from source
  ✖ Error: mkdir -p /Users/rcamara/.nvm/versions/node/v6.9.1/lib/node_modules/preact-cli/node_modules/simplehttp2server/vendor && sh crosscompile.sh && mv ./0b8e785b-983c-4e28-a5e6-2ff843386495_darwin_amd64 /Users/rcamara/.nvm/versions/node/v6.9.1/lib/node_modules/preact-cli/node_modules/simplehttp2server/vendor/simplehttp2server
Command failed: sh crosscompile.sh && mv ./0b8e785b-983c-4e28-a5e6-2ff843386495_darwin_amd64 /Users/rcamara/.nvm/versions/node/v6.9.1/lib/node_modules/preact-cli/node_modules/simplehttp2server/vendor/simplehttp2server
bash: go: command not found
bash: go: command not found
bash: go: command not found
bash: go: command not found
bash: go: command not found

    at ChildProcess.exithandler (child_process.js:206:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

then at the very last line

npm WARN [email protected] requires a peer of preact@* but none was installed.

Most helpful comment

Just an update, I was able to run and start an app using preact-cli

All 4 comments

Those are actually all just warnings - the install likely worked fine :) We can probably remove that preact peer dependency warning though.

Got it. Yup, the output of npm install looked fine. I was just curious what bash: go: command not found is. No sure what go is. Maybe it's the binary for golang :)

^ it is! it's a little bit odd - the most widely-used HTTP2 server we could find was simplehttp2server, which is written in Go. preact-cli uses an npm module that tries various methods to install it, and doesn't seem to suppress warnings for the methods that fail.

Ideally, it would be better to have a Node-based server, since there are options out there already that come very close to fitting the need.

Just an update, I was able to run and start an app using preact-cli

Was this page helpful?
0 / 5 - 0 ratings