[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Object.keys called on non-object #6987

Closed
mathieug opened this issue Dec 22, 2014 · 21 comments
Closed

Object.keys called on non-object #6987

mathieug opened this issue Dec 22, 2014 · 21 comments

Comments

@mathieug
Copy link

npm update gives me:

395 verbose request uri https://registry.npmjs.org/htmlparser2
396 verbose request no auth needed
397 info attempt registry request try #1 at 09:51:55
398 verbose etag "224K2FCVRDI9O18QND181DCYY"
399 http request GET https://registry.npmjs.org/htmlparser2
400 verbose type called_on_non_object
401 verbose stack TypeError: Object.keys called on non-object
401 verbose stack     at Function.keys (native)
401 verbose stack     at unmarkExtraneous (/usr/local/lib/node_modules/npm/node_modules/r$
401 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/read-installed/read$
401 verbose stack     at next (/usr/local/lib/node_modules/npm/node_modules/read-installe$
401 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/read-installed/read$
401 verbose stack     at Object.oncomplete (evalmachine.<anonymous>:108:15)
@tobysteward
Copy link

I'm getting the same issue

@feross
Copy link
feross commented Dec 22, 2014

+1

@mathieug
Copy link
Author

I think that comes from the last update

@feross
Copy link
feross commented Dec 22, 2014

Yep, I was on 2.1.11 before. 2.1.14 is broken.

@feross
Copy link
feross commented Dec 22, 2014

Looks like 2.1.13 introduced the problem.

@maxvodo
Copy link
maxvodo commented Dec 22, 2014

After dist-upgrade my Ubuntu, a have same error. Workaround works for me: #3443 (comment)

@Va1
Copy link
Va1 commented Dec 22, 2014

Same errors on:

$ sudo npm update -g

Ubuntu 14.04, node v0.10.33, npm 2.1.14

@fffabs
Copy link
fffabs commented Dec 22, 2014

Same here on OS X Yosemite on

sudo npm update -g

OS X Yosemite, node v0.10.34, npm 2.1.14

@chatman-media
Copy link

+1

@al002
Copy link
al002 commented Dec 22, 2014

same here, Archlinux

node v0.10.34

npm 2.1.15

@nibushibu
Copy link

Same error on OS X 10.10.1 Yosemite
node v0.10.34
npm 2.1.14

@maxvodo 's workaround is seem to be working for me. 👍

@stevenjlho
Copy link

Thanks, it is work for me.

@othiym23
Copy link
Contributor

Fixed by a4e4e33 / npm@2.1.16. Install npm@next to test the fix:

npm -g install npm@next

@jamierytlewski
Copy link

I tried @othiym23 of install npm -g install npm@next and I was upgraded to 2.1.16.

Now I'm getting

Cannot find module '/usr/local/lib/node_modules/npm/lib/build.js'

errors.

Running Yosemite, node 0.10.34

Thanks

@zakdances
Copy link

Also getting the Cannot find module error with npm 2.1.16 installed via nvm:

Cannot find module '/Users/zak/.nvm/v0.10.33/lib/node_modules/npm/lib/build.js'

@othiym23
Copy link
Contributor

@jamierytlewski @zakdances It sounds like you two need to reset your npm installations, because something got messed up. I've verified that lib/build.js is in the tarball for npm@2.1.16.

@tobysteward
Copy link

Updating to 2.1.16 fixed this issue for me.

@jamierytlewski
Copy link

Thanks @othiym23, resetting my npm installation worked.

@ptrhvns
Copy link
ptrhvns commented Dec 23, 2014

I'm also seeing this issue despite attempting to follow the steps above. It looks like the version of npm gets downgraded when attempting to upgrade things globally. So, is this issue really closed? Anyway, the steps I followed are below. Did I miss something?

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.9.5
BuildVersion:   13F34

$ nvm deactivate                                                                                                                                                                                                     [155/1359]
/Users/<username>/.nvm/*/bin removed from $PATH
/Users/<username>/.nvm/*/share/man removed from $MANPATH

$ nvm uninstall v0.10.35
Uninstalled node v0.10.35
Deleted alias default

$ nvm ls
         N/A

$ nvm install v0.10.35
######################################################################## 100.0%
Now using node v0.10.35

$ node --version
v0.10.35

$ npm --version
1.4.28

$ npm -g install npm@next
/Users/<username>/.nvm/v0.10.35/bin/npm -> /Users/<username>/.nvm/v0.10.35/lib/node_modules/npm/bin/npm-cli.js
npm@2.1.16 /Users/<username>/.nvm/v0.10.35/lib/node_modules/npm

$ npm --version
2.1.16

$ npm update -g
/Users/<username>/.nvm/v0.10.35/bin/npm -> /Users/<username>/.nvm/v0.10.35/lib/node_modules/npm/bin/npm-cli.js
npm@2.1.14 /Users/<username>/.nvm/v0.10.35/lib/node_modules/npm

$ npm --version
2.1.14

$ npm update -g
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/Users/<username>/.nvm/v0.10.35/bin/npm" "update" "-g"
npm ERR! node v0.10.35
npm ERR! npm  v2.1.14

npm ERR! Object.keys called on non-object
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/Users/<username>/.nvm/v0.10.35/bin/npm" "update" "-g"
npm ERR! node v0.10.35
npm ERR! npm  v2.1.14

# ...

@othiym23
Copy link
Contributor

Don't use npm update -g.

@csvan
Copy link
csvan commented Dec 24, 2014

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests