`keybase update` fails
I tried to update via keybase update and it failed sending this to standard output
info: Computed npm install prefix: /usr
info: Found keybase-installer: keybase-installer v1.0.0
info: Using default npm install prefix
info: Attempting software upgrade.....
info: Running `keybase-installer -g gpg2`
npm ERR! version Bad package.json data undefined
npm ERR! Linux 3.17.6-1-ARCH
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "version"
npm ERR! node v0.10.33
npm ERR! npm v2.1.14
npm ERR! Unexpected token u
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/skeuomorf/npm-debug.log
error: Couldn't find an `npm` command in your path
error: exit code 254
These are the contents of npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'version' ]
2 info using [email protected]
3 info using [email protected]
4 verbose config Skipping project config: /home/skeuomorf/.npmrc. (matches userconfig)
5 error version Bad package.json data undefined
6 verbose type unexpected_token
7 verbose stack SyntaxError: Unexpected token u
7 verbose stack at Object.parse (native)
7 verbose stack at /usr/lib/node_modules/npm/lib/version.js:36:19
7 verbose stack at evalmachine.<anonymous>:207:20
7 verbose stack at OpenReq.Req.done (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:141:5)
7 verbose stack at OpenReq.done (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:61:22)
7 verbose stack at Object.oncomplete (evalmachine.<anonymous>:107:15)
8 verbose cwd /home/skeuomorf
9 error Linux 3.17.6-1-ARCH
10 error argv "/usr/bin/node" "/usr/bin/npm" "version"
11 error node v0.10.33
12 error npm v2.1.14
13 error Unexpected token u
14 error If you need help, you may report this error at:
14 error <http://github.com/npm/npm/issues>
15 verbose exit [ 1, true ]
I imagine this might be related to https://github.com/npm/npm/issues/6247 since keybase-installer runs as keybase-installer -g pkg?
npm is already available on my $PATH, OS is Arch Linux running kernel 3.17.6-1
I am closing this as the lastest node update fixes it.
I'm having this issue with the latest Node (v0.10.34) and npm (v2.1.16).
Reopening as I can confirm that the problem still exists, using Node version 0.10.34 and npm version 2.1.15.
I can confirm this issue as well:
> keybase update
info: Attempting software upgrade.....
npm ERR! version Bad package.json data undefined
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "version"
npm ERR! node v0.10.35
npm ERR! npm v2.1.14
npm ERR! Unexpected token u
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/bin/npm-debug.log
error: Couldn't find an `npm` command in your path
error: exit code 254
Try:
npm install -g keybase-installer
And redo it On Dec 28, 2014 11:25 AM, "Martijn Heemels" [email protected] wrote:
I can confirm this issue as well:
keybase update info: Attempting software upgrade..... npm ERR! version Bad package.json data undefined npm ERR! Darwin 14.0.0 npm ERR! argv "node" "/usr/local/bin/npm" "version" npm ERR! node v0.10.35 npm ERR! npm v2.1.14
npm ERR! Unexpected token u npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! http://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request: npm ERR! /usr/local/bin/npm-debug.log error: Couldn't find an
npmcommand in your path error: exit code 254— Reply to this email directly or view it on GitHub https://github.com/keybase/keybase-issues/issues/1265#issuecomment-68211552 .
Unfortunately that command fails as well:
> npm install -g keybase-installer
npm ERR! not a package /usr/local/bin/keybase-installer
npm ERR! addLocal Could not install /usr/local/bin/keybase-installer
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "keybase-installer"
npm ERR! node v0.10.35
npm ERR! npm v2.1.14
npm ERR! path /var/folders/d5/ll2jjm6s6cz1xpzhqjy2kw6m0000gn/T/npm-16533-6cfc9f96/unpack-b7925f725dea/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! enoent ENOENT, open '/var/folders/d5/ll2jjm6s6cz1xpzhqjy2kw6m0000gn/T/npm-16533-6cfc9f96/unpack-b7925f725dea/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/bin/npm-debug.log
Hmm, after rm -rf ~/.npm the npm install command is now working and the keybase update succeeded as well! It appears my npm environment was messed up.
Thanks for pointing me in the right direction.
Well, npm install -g keybase-installer fails for me as well as keybase update even after cleaning the npm cache i.e. the ~/.npm folder.
Can provide logs and error messages if needed.
Hi @skeuomorf, that would help. I can't currently reproduce your errors. It might be a permissions problem. Thanks.
Hey @maxtaco, you're spot on, it was a permissions problem (my mistake), I forgot to give npm install -g keybase-installer sudo permissions. Thanks for your time :)
For anyone else who might encounter this problem:
- run
sudo npm-install -g keybase-installer - run
sudo keybase updateand it should work correctly.
Closing the issue as this is no longer reproducible.