Hyper: Update error

Created on 6 Nov 2017  ·  7Comments  ·  Source: vercel/hyper

  • [ ] I am on the latest Hyper.app version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate

  • OS version and name: Antergos (ArchLinux) - Rolling release.

  • Hyper.app version: v2.0.4
  • Link of a Gist with the contents of your .hyper.js: https://gist.github.com/jkw/7e83ea21ce1fd10fafa9d5dd4e04dc0d
  • Relevant information from devtools _(CMD+ALT+I on macOS, CTRL+SHIFT+I elsewhere)_: n/a
  • The issue is reproducible in vanilla Hyper.app: Not relevant.

Issue

info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Error output:
error /tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/app/node_modules/node-pty: Command failed.
Exit code: 1
Command: node scripts/install.js
Arguments: 
Directory: /tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/app/node_modules/node-pty
Output:
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/app/node_modules/node-pty/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/jkw/.electron-gyp/iojs-1.7.9/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/jkw/.electron-gyp/iojs-1.7.9',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/jkw/.electron-gyp/iojs-1.7.9/<(target_arch)/iojs.lib',
gyp info spawn args   '-Dmodule_root_dir=/tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/app/node_modules/node-pty',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
gyp: Call to 'node -e "require('nan')"' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at emitTwo (events.js:135:13)
gyp ERR! stack     at ChildProcess.emit (events.js:224:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Linux 4.13.11-1-ARCH
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/app/node_modules/node-pty
gyp ERR! node -v v9.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

    at ChildProcess.childProcess.once.code (/tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/node_modules/builder-util/src/util.ts:228:14)
    at Object.onceWrapper (events.js:326:30)
    at emitTwo (events.js:135:13)
    at ChildProcess.emit (events.js:224:7)
    at maybeClose (internal/child_process.js:943:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
From previous event:
    at spawn (/tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/node_modules/builder-util/src/util.ts:191:3)
    at installDependencies (/tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/node_modules/electron-builder/src/util/yarn.ts:90:3)
    at /tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/node_modules/electron-builder/src/util/yarn.ts:18:11
    at Generator.next (<anonymous>)
From previous event:
    at installOrRebuild (/tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/node_modules/electron-builder/out/util/yarn.js:32:21)
    at /tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/node_modules/electron-builder/src/cli/install-app-deps.ts:58:42
    at Generator.next (<anonymous>)
From previous event:
    at installAppDeps (/tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/node_modules/electron-builder/out/cli/install-app-deps.js:51:21)
    at then (/tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/node_modules/electron-builder/src/cli/cli.ts:49:4)
    at runCallback (timers.js:800:20)
    at tryOnImmediate (timers.js:762:5)
    at processImmediate [as _immediateCallback] (timers.js:733:5)
From previous event:
    at Object.args [as handler] (/tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/node_modules/electron-builder/src/cli/cli.ts:49:4)
    at Object.runCommand (/tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/node_modules/yargs/lib/command.js:228:22)
    at Object.parseArgs [as _parseArgs] (/tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/node_modules/yargs/yargs.js:1013:30)
    at Object.get [as argv] (/tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/node_modules/yargs/yargs.js:957:21)
    at Object.<anonymous> (/tmp/pamac-build-jkw/hyper/src/hyper-2.1.1/node_modules/electron-builder/src/cli/cli.ts:43:15)
    at Module._compile (module.js:641:30)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
    at Function.Module._load (module.js:495:3)
    at Function.Module.runMain (module.js:682:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:613:3
error Command failed with exit code 255.                                                                
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.                
==> FEL:  Ett fel uppstod i prepare().                                                                  
    Avbryter...

Trying to update trough AUR to latest version via https://aur.archlinux.org/packages/hyper/

Shout if I can contribute with more information.

help wanted Linux

Most helpful comment

@jkw Does not look like you generated en_US.UTF-8 there, try to uncomment en_US.UTF-8 in /etc/locale.gen and then running locale-gen. You original error message contains:

/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

All 7 comments

Hitting the same problem when attempting to build hyper from canary branch (node v8.8.1):

~/.cache/pacaur/hyper-git/src/hyper-git (canary ✔) ᐅ yarn 
yarn install v1.3.2
[1/4] Resolving packages...
success Already up-to-date.
$ electron-builder install-app-deps && yarn run rebuild-node-pty
electron-builder 19.43.0
Installing app dependencies for linux:x64 to /home/edvin/.cache/pacaur/hyper-git/src/hyper-git/app
Error: /usr/bin/node exited with code 1
Output:
yarn install v1.3.2
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Error output:
error /home/edvin/.cache/pacaur/hyper-git/src/hyper-git/app/node_modules/node-pty: Command failed.
Exit code: 1
Command: node scripts/install.js
Arguments: 
Directory: /home/edvin/.cache/pacaur/hyper-git/src/hyper-git/app/node_modules/node-pty
Output:
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/edvin/.cache/pacaur/hyper-git/src/hyper-git/app/node_modules/node-pty/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/edvin/.electron-gyp/iojs-1.7.9/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/edvin/.electron-gyp/iojs-1.7.9',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/edvin/.electron-gyp/iojs-1.7.9/<(target_arch)/iojs.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/edvin/.cache/pacaur/hyper-git/src/hyper-git/app/node_modules/node-pty',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
gyp: Call to 'node -e "require('nan')"' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.13.11-1-ARCH
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/edvin/.cache/pacaur/hyper-git/src/hyper-git/app/node_modules/node-pty
gyp ERR! node -v v8.8.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

    at ChildProcess.childProcess.once.code (/home/edvin/.cache/pacaur/hyper-git/src/hyper-git/node_modules/builder-util/src/util.ts:228:14)
    at Object.onceWrapper (events.js:316:30)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:927:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
From previous event:
    at spawn (/home/edvin/.cache/pacaur/hyper-git/src/hyper-git/node_modules/builder-util/src/util.ts:191:3)
    at installDependencies (/home/edvin/.cache/pacaur/hyper-git/src/hyper-git/node_modules/electron-builder/src/util/yarn.ts:90:3)
    at /home/edvin/.cache/pacaur/hyper-git/src/hyper-git/node_modules/electron-builder/src/util/yarn.ts:18:11
    at Generator.next (<anonymous>)
From previous event:
    at installOrRebuild (/home/edvin/.cache/pacaur/hyper-git/src/hyper-git/node_modules/electron-builder/out/util/yarn.js:32:21)
    at /home/edvin/.cache/pacaur/hyper-git/src/hyper-git/node_modules/electron-builder/src/cli/install-app-deps.ts:58:42
    at Generator.next (<anonymous>)
From previous event:
    at installAppDeps (/home/edvin/.cache/pacaur/hyper-git/src/hyper-git/node_modules/electron-builder/out/cli/install-app-deps.js:51:21)
    at then (/home/edvin/.cache/pacaur/hyper-git/src/hyper-git/node_modules/electron-builder/src/cli/cli.ts:49:4)
    at runCallback (timers.js:785:20)
    at tryOnImmediate (timers.js:747:5)
    at processImmediate [as _immediateCallback] (timers.js:718:5)
From previous event:
    at Object.args [as handler] (/home/edvin/.cache/pacaur/hyper-git/src/hyper-git/node_modules/electron-builder/src/cli/cli.ts:49:4)
    at Object.runCommand (/home/edvin/.cache/pacaur/hyper-git/src/hyper-git/node_modules/yargs/lib/command.js:228:22)
    at Object.parseArgs [as _parseArgs] (/home/edvin/.cache/pacaur/hyper-git/src/hyper-git/node_modules/yargs/yargs.js:1013:30)
    at Object.get [as argv] (/home/edvin/.cache/pacaur/hyper-git/src/hyper-git/node_modules/yargs/yargs.js:957:21)
    at Object.<anonymous> (/home/edvin/.cache/pacaur/hyper-git/src/hyper-git/node_modules/electron-builder/src/cli/cli.ts:43:15)
    at Module._compile (module.js:612:30)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Function.Module.runMain (module.js:653:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

I'm having the same issue, trying to upgrade with pacaur -Syu.
Gist of my hyper.js
Gist of the error.

Alright, I investigate this some more and first addressed this error from running the commands:
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

Turns out I did not have en_US.UTF-8 generated, but es_US.UTF-8. Fixed my issue by uncommenting en_US.UTF-8 and running (sudo) locale-gen en_US.UTF-8. I'm now able to build hyper again.

ping: @chabou @tom-davies @jkw

@hultberg thanks! Strange that previous versions built just fine, but this one doesn't! Would it be possible to build without en_US.UTF-8, for example using en_GB.UTF-8 instead? If so, how would one go about that?

@hultberg Tried generating locales, as I use Swedish, it generates Swedish locales and the error still persists.

[jkw@zetta ~]$ sudo locale-gen en_US.UTF-8
Generating locales...
  sv_SE.UTF-8... done
Generation complete.

@jkw Does not look like you generated en_US.UTF-8 there, try to uncomment en_US.UTF-8 in /etc/locale.gen and then running locale-gen. You original error message contains:

/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

@hultberg - That fixed the issue, closing the Issue now. Thanks all!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

juicygoose picture juicygoose  ·  3Comments

rauchg picture rauchg  ·  3Comments

hxnt picture hxnt  ·  3Comments

alejandrofloresm picture alejandrofloresm  ·  3Comments

ghost picture ghost  ·  3Comments