Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

TypeError: LRU: key must be a string or number. Almost certainly a bug! #2047

Closed
xzyfer opened this issue Nov 25, 2015 · 10 comments
Closed

TypeError: LRU: key must be a string or number. Almost certainly a bug! #2047

xzyfer opened this issue Nov 25, 2015 · 10 comments
Assignees

Comments

@xzyfer
Copy link

xzyfer commented Nov 25, 2015

This error has returned as of 1.6.6 when running bower install --allow-root --quiet.

TypeError: LRU: key must be a string or number. Almost certainly a bug! undefined
    at typeCheckKey (/my-app/node_modules/bower/node_modules/lru-cache/lib/lru-cache.js:20:19)
    at LRUCache.get (/my-app/node_modules/bower/node_modules/lru-cache/lib/lru-cache.js:230:3)
    at /my-app/node_modules/bower/lib/core/resolvers/GitRemoteResolver.js:122:70
    at _fulfilled (/my-app/node_modules/bower/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/my-app/node_modules/bower/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/my-app/node_modules/bower/node_modules/q/q.js:796:13)
    at /my-app/node_modules/bower/node_modules/q/q.js:857:14
    at runSingle (/my-app/node_modules/bower/node_modules/q/q.js:137:13)
    at flush (/my-app/node_modules/bower/node_modules/q/q.js:125:13)
    at doNTCallback0 (node.js:408:9)
$  node -v
v2.5.0
$  node -p process.versions
{ http_parser: '2.5.0',
  node: '2.5.0',
  v8: '4.2.77.21',
  uv: '1.6.1',
  zlib: '1.2.8',
  ares: '1.10.1-DEV',
  modules: '44',
  openssl: '1.0.2d' }
$  node -p process.platform
darwin
$  node -p process.arch
x64
@kunyan
Copy link
Member

kunyan commented Nov 26, 2015

root@da83d9532a93:/# bower install --allow-root --quiet
root@da83d9532a93:/# node -p process.versions
{ http_parser: '2.5.0',
  node: '2.5.0',
  v8: '4.2.77.21',
  uv: '1.6.1',
  zlib: '1.2.8',
  ares: '1.10.1-DEV',
  modules: '44',
  openssl: '1.0.2d' }
root@da83d9532a93:/# node -p process.arch
x64
root@da83d9532a93:/# bower -v
root@da83d9532a93:/# bower install jquery --allow-root --quiet
root@da83d9532a93:/# ls
bin  boot  bower.json  bower_components  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var

@xzyfer I can't reproduce it, can you post your bower.json ?

@Nopzen
Copy link

Nopzen commented Nov 26, 2015

Same error is pressent on node version 0.12.5.

@daltones
Copy link

I'm having the same issue with bower 1.6.6 and node 4.2.2.

In my case seems like the problem occurs if you set a branch name in some dependency version. Like this:

"jquery.easy-pie-chart": "master"

or

"jquery.easy-pie-chart": "rendro/easy-pie-chart#master"

or similar.

I also notice that the error occurs just for the first dependency matching this pattern while resolving.

Commit hashes works fine here.

@Tenzer
Copy link

Tenzer commented Nov 26, 2015

I had the same problem with both Bower 1.6.6 and 1.6.7 on Node 4.2.2 and 5.1.0. Removing the ~/.cache/bower folder solved the problem for me, for some reason.

@Nopzen
Copy link

Nopzen commented Nov 26, 2015

I can confirm the fix @Tenzer suggests, on v4.0 but wont fix on v0.12.5.

@frederikbosch
Copy link

I cannot confirm the fix by @Tenzer, I am on bower 1.6.6 and node v4.2.2.

@kunyan kunyan added the bug label Nov 26, 2015
kunyan added a commit that referenced this issue Nov 26, 2015
@faceleg faceleg added in progress and removed bug labels Nov 26, 2015
@kunyan
Copy link
Member

kunyan commented Nov 26, 2015

#2040 would fix this issue

@sheerun
Copy link
Contributor

sheerun commented Nov 26, 2015

I've merged the fix and I'm going to release soon.

@NextZeus
Copy link

NextZeus commented Oct 9, 2016

bower update

@frederikbosch
Copy link

Thanks, never knew that the command existed.

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

No branches or pull requests

9 participants