Closed wraithan closed 10 years ago
Just came here to report the same problem. Adding a little logging reveals that semver.parse()
is returning null when asked to parse version strings like 0.6.0dev2
.
Patch to padded-semver incoming.
same here.
Not sure if this is related at all, but on Windows it gets to 100% and then spins forever (or at least for 12+ hours). It even printed 100.12 and 100.18 at some point. I retried in verbose mode, where it started dumping module descriptions (very slowly). There seemed to be no end so I eventually terminated it.. Here's the output I had at that point.
That's normal operation, I believe. Dominic has patched the bug reported here in his latest version, so what you're seeing is what happens when it chugs through all of the nom metadata. I think.
12+ hours can't be normal operation. There's also no chugging going on, as CPU is at 0%. Memory usage seemed a little high, at 1.3 GB, but it wasn't really leaking beyond that (at least not very fast).
this is the intended behavior. It's runs forever in the background, first syncing old modules, then syncing new ones as they are published. If you let it run the the background then your local database will always be up to date.
Once it is synced the modules it's logging are the modules that are being updated. It's only slow because people are not writing modules fast enough. :(
There is a memory thing, that is really a problem about scheduling leveldb map-reduce and indexing stuff... which is a separate problem. leveldb seems bad at not deallocating memory.
The real problem here how can I make the output and the documentation clearer so that the intended behavior is more obvious?
Ohhh I see. I was thinking I needed to wait for the initial sync to finish before I could use it.
Crashed on the initial sync here too;
|....:....|....:....|....:....|....:....|....:....| 65.20%
|....:....|....:....|....:....|....:....|....:....| 62.96%
/Users/balupton/.nvm/v0.10.22/lib/node_modules/npmd/plugins/couch-sync.js:27
if(doc._deleted) return
^
TypeError: Cannot read property '_deleted' of null
at /Users/balupton/.nvm/v0.10.22/lib/node_modules/npmd/plugins/couch-sync.js:27:13
at /Users/balupton/.nvm/v0.10.22/lib/node_modules/npmd/node_modules/level-couch-sync/index.js:96:7
at Feed.onfollow (/Users/balupton/.nvm/v0.10.22/lib/node_modules/npmd/node_modules/level-couch-sync/index.js:128:7)
at Feed.<anonymous> (/Users/balupton/.nvm/v0.10.22/lib/node_modules/npmd/node_modules/level-couch-sync/node_modules/follow/api.js:23:55)
at Feed.EventEmitter.emit (events.js:95:17)
at Feed.on_good_change (/Users/balupton/.nvm/v0.10.22/lib/node_modules/npmd/node_modules/level-couch-sync/node_modules/follow/lib/feed.js:563:8)
at Feed.on_change (/Users/balupton/.nvm/v0.10.22/lib/node_modules/npmd/node_modules/level-couch-sync/node_modules/follow/lib/feed.js:526:17)
at Feed.on_couch_data (/Users/balupton/.nvm/v0.10.22/lib/node_modules/npmd/node_modules/level-couch-sync/node_modules/follow/lib/feed.js:410:8)
at Changes.handle_confirmed_req_event (/Users/balupton/.nvm/v0.10.22/lib/node_modules/npmd/node_modules/level-couch-sync/node_modules/follow/lib/feed.js:290:30)
at Changes.EventEmitter.emit (events.js:95:17)
that is strange, okay, added a check for that... try npmd@0.20.1 or later.
@dominictarr I didn't find npmd@0.20.1 on npm/github.
pushed!
In the new rewrite this will all be reorganized so that syncing is optional, and so you can install a module without syncing first. (it will request couch docs and store them in the cache like npm classic)
The main thing that will change is how the cache works, so you'll be able to offline install from cache even for modules that depend on a url (i.e. a git or http url)
@dominictarr Installed the latest version and --sync is working for me now without crashing, so I'll go ahead and close this ticket.
I just globally installed
npmd
and I tried runningnpmd --sync
and I get the below stacktrace.I have tried rerunning the command, and I tried deleting my
~/.npmd
and resyncing everything and still got this stacktrace.