Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Updates query failed #3

Closed
nevd opened this issue May 1, 2019 · 10 comments
Closed

Updates query failed #3

nevd opened this issue May 1, 2019 · 10 comments

Comments

@nevd
Copy link

nevd commented May 1, 2019

On a new installation of the extension manager I am getting an error of Updates query failed

OS = Apple Mojave
node = homebrew latest

This is the log output

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/local/Cellar/node/12.1.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'outdated',
1 verbose cli '-g',
1 verbose cli 'roon-extension-repository',
1 verbose cli '--depth=0'
1 verbose cli ]
2 info using npm@6.9.0
3 info using node@v12.1.0
4 verbose npm-session c2f41b328665c20c
5 verbose stack TypeError: Cannot read property 'length' of undefined
5 verbose stack at dotindex (/usr/local/lib/node_modules/npm/node_modules/text-table/index.js:59:32)
5 verbose stack at /usr/local/lib/node_modules/npm/node_modules/text-table/index.js:11:21
5 verbose stack at Array.forEach ()
5 verbose stack at forEach (/usr/local/lib/node_modules/npm/node_modules/text-table/index.js:73:31)
5 verbose stack at /usr/local/lib/node_modules/npm/node_modules/text-table/index.js:10:9
5 verbose stack at Array.reduce ()
5 verbose stack at reduce (/usr/local/lib/node_modules/npm/node_modules/text-table/index.js:63:30)
5 verbose stack at module.exports (/usr/local/lib/node_modules/npm/node_modules/text-table/index.js:9:20)
5 verbose stack at /usr/local/lib/node_modules/npm/lib/outdated.js:130:16
5 verbose stack at cb (/usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
5 verbose stack at doIt (/usr/local/lib/node_modules/npm/lib/outdated.js:381:14)
5 verbose stack at shouldUpdate (/usr/local/lib/node_modules/npm/lib/outdated.js:366:12)
5 verbose stack at /usr/local/lib/node_modules/npm/lib/outdated.js:326:23
5 verbose stack at /usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:35
5 verbose stack at Array.forEach ()
5 verbose stack at /usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:11
6 verbose cwd /Users/nev/.RoonExtensions/lib/node_modules/roon-extension-manager
7 verbose Darwin 18.5.0
8 verbose argv "/usr/local/Cellar/node/12.1.0/bin/node" "/usr/local/bin/npm" "outdated" "-g" "roon-extension-repository" "--depth=0"
9 verbose node v12.1.0
10 verbose npm v6.9.0
11 error Cannot read property 'length' of undefined
12 verbose exit [ 1, true ]

@JanKoudijs
Copy link
Contributor

You might be the first trying the Extension Manager on node 12.

If you open a command window and give the command:

npm outdated -g roon-extension-repository --depth=0

Does it then give an error as well?

@nevd
Copy link
Author

nevd commented May 4, 2019

npm outdated -g roon-extension-repository --depth=0

npm ERR! Cannot read property 'length' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/*****/.npm/_logs/2019-05-04T07_36_44_221Z-debug.log

I think I can switch back to node 11, ( I use homebridge on the same machine with the same node install but it is fine in 12 )

@JanKoudijs
Copy link
Contributor

This is a bug in npm 6.9.0:

npm/cli#173

There is a fix but it isn't released yet.
You could try to install 6.9.1-next as suggested by nikoladev in the linked page.

@nevd
Copy link
Author

nevd commented May 4, 2019

I have it a go 👎 : no joy I think you can see which version I am using in the log below.

I will have a go at downgrading to 11, the extensions are not stable under 12. I am finding the manager dies periodically. I believe that one of the issues is when I power off an endpoint (KEF LS50W) the extension manager dies. ( I need to verify this is an issue on 11 before I open an issue for it )

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/local/Cellar/node/12.1.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'outdated',
1 verbose cli '-g',
1 verbose cli '--depth=0'
1 verbose cli ]
2 info using npm@6.9.0
3 info using node@v12.1.0
4 verbose npm-session 0768975893ea8219
5 http fetch GET 304 https://registry.npmjs.org/npm 132ms (from cache)
6 silly pacote registry packument for npm@^6.9.1-next.0 fetched in 147ms
7 verbose stack TypeError: Cannot read property 'length' of undefined
7 verbose stack at dotindex (/usr/local/lib/node_modules/npm/node_modules/text-table/index.js:59:32)
7 verbose stack at /usr/local/lib/node_modules/npm/node_modules/text-table/index.js:11:21
7 verbose stack at Array.forEach ()
7 verbose stack at forEach (/usr/local/lib/node_modules/npm/node_modules/text-table/index.js:73:31)
7 verbose stack at /usr/local/lib/node_modules/npm/node_modules/text-table/index.js:10:9
7 verbose stack at Array.reduce ()
7 verbose stack at reduce (/usr/local/lib/node_modules/npm/node_modules/text-table/index.js:63:30)
7 verbose stack at module.exports (/usr/local/lib/node_modules/npm/node_modules/text-table/index.js:9:20)
7 verbose stack at /usr/local/lib/node_modules/npm/lib/outdated.js:130:16
7 verbose stack at cb (/usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
7 verbose stack at doIt (/usr/local/lib/node_modules/npm/lib/outdated.js:381:14)
7 verbose stack at updateDeps (/usr/local/lib/node_modules/npm/lib/outdated.js:443:9)
7 verbose stack at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
7 verbose stack at Promise.successAdapter [as _fulfillmentHandler0] (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/nodei
fy.js:23:30)
7 verbose stack at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:566:21)
7 verbose stack at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
8 verbose cwd /Users/nev/.RoonExtensions/lib/node_modules/roon-extension-manager
9 verbose Darwin 18.5.0
10 verbose argv "/usr/local/Cellar/node/12.1.0/bin/node" "/usr/local/bin/npm" "outdated" "-g" "--depth=0"
11 verbose node v12.1.0
12 verbose npm v6.9.0
13 error Cannot read property 'length' of undefined
14 verbose exit [ 1, true ]

@josezulu
Copy link

josezulu commented May 4, 2019

@nevd if node 11 has npm 6.9.0, you'll still have the same issue. I have it with 10.5.3.

edit: I mean, I get the error when npm -g outdated

@nevd
Copy link
Author

nevd commented May 4, 2019

I did not read your comment until I downgraded to 11 and found I had the same issue.

I am not familiar enough with node/npm and homebrew but I think I want both version 10 & 12 installed. I will use 12 for homebridge and I will stick with 10 for roon extensions and see if I can get some stability. This was all to get the alarm working, but then I found some other extensions I really liked. (I am an arcam owner)

@josezulu
Copy link

josezulu commented May 4, 2019

@nevd , have you tried the below mentioned in an earlier post?

by @JanKoudijs
This is a bug in npm 6.9.0:

npm/cli#173

There is a fix but it isn't released yet.
You could try to install 6.9.1-next as suggested by nikoladev in the linked page.

See here:
npm/cli#173 (comment)

npm i -g npm@6.9.1-next.0

This should force an install of version 6.9.1, where npm -g outdated should be working.

Please bear in mind that I haven't tried it myself, so please check before doing this to ensure it doesn't break anything you need.

@nevd
Copy link
Author

nevd commented May 4, 2019

Yep in #3 (comment)

I had done it and I bolded the line which showed the version of npm I was using.

Since I had gotten back to 11 I decided to try the arcam module again as that never worked for me under 12 and it does not work under 11. I will switch back to 12 or maybe try 10 and see if I can find a sweet spot.

@josezulu
Copy link

josezulu commented May 4, 2019

OK, I was just asking because I see in that log that many lines still read npm v6.9.0

I'm sorry, I'm afraid that I don't have other suggestions to offer. I hope you can solve it so you aren't locked to a specific version of Node.

@JanKoudijs
Copy link
Contributor

JanKoudijs commented Jul 27, 2019

Node v12.7.0 has been released. This release includes v6.10.0 of npm, which contains the fix for the bug that is reported in this issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants