Kraken
Kraken

Reputation: 5860

Apache CouchDB + npm-registry-couchapp debugging configuration = cannot npm install

Currently I'm in the process of creating a private npm registry. I've got couchdb set up and is replicating, as I have verified using the couchdb curl request /_all_docs, which returns what appears to be the entire list of libs stored on NPM. The problem I'm having is that I cannot seem to run an npm install. When I comment out the assignment of the registry variable in .npmrc, I can install without issue.

Here are the relevant lines from .npmrc:

registry = http://localhost:5984/registry/_design/app/_rewrite
npmjs.org:couch = http://<user>:<password>@127.0.0.1:5984/registry

I've added the recommended lines to local.ini, I'm using npm-registry-couchapp and have followed all directions there as well.

When I attempt npm install in the terminal, it hangs up on the following step: fetchMetadata: sill install loadAllDepsIntoIdealTree

The following command also fails, npm \ --registry=http://localhost:5984/registry/_design/app/_rewrite \ install node-sass

Here's the output from the npm debug log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'install' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 28055a10e204f6fe
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall [email protected]
7 info lifecycle [email protected]~preinstall: [email protected]
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 silly install loadShrinkwrap
13 silly install loadAllDepsIntoIdealTree
14 http fetch GET 500 http://localhost:5984/registry/_design/app/_rewrite/request 70119ms attempt #3
15 http fetch GET 500 http://localhost:5984/registry/_design/app/_rewrite/rimraf 70114ms attempt #3
16 silly fetchPackageMetaData error for request@^2.42.0 500 Internal Server Error: request@^2.42.0
17 silly fetchPackageMetaData error for rimraf@~2.2.6 500 Internal Server Error: rimraf@~2.2.6
18 http fetch GET 500 http://localhost:5984/registry/_design/app/_rewrite/parse-json-response 70120ms attempt #3
19 http fetch GET 500 http://localhost:5984/registry/_design/app/_rewrite/which 70115ms attempt #3
20 silly fetchPackageMetaData error for parse-json-response@^1.0.1 500 Internal Server Error: parse-json-response@^1.0.1
21 silly fetchPackageMetaData error for which@^1.0.5 500 Internal Server Error: which@^1.0.5
22 http fetch GET 500 http://localhost:5984/registry/_design/app/_rewrite/couchapp 70119ms attempt #3
23 http fetch GET 500 http://localhost:5984/registry/_design/app/_rewrite/json 70119ms attempt #3
24 http fetch GET 500 http://localhost:5984/registry/_design/app/_rewrite/semver 70117ms attempt #3
25 http fetch GET 500 http://localhost:5984/registry/_design/app/_rewrite/tap 70124ms attempt #3
26 silly fetchPackageMetaData error for couchapp@~0.11.0 500 Internal Server Error: couchapp@~0.11.0
27 silly fetchPackageMetaData error for json@^9.0.2 500 Internal Server Error: json@^9.0.2
28 silly fetchPackageMetaData error for semver@4 500 Internal Server Error: semver@4
29 silly fetchPackageMetaData error for tap@* 500 Internal Server Error: tap@*
30 http fetch GET 500 http://localhost:5984/registry/_design/app/_rewrite/semver 70032ms attempt #3
31 http fetch GET 500 http://localhost:5984/registry/_design/app/_rewrite/json 70034ms attempt #3
32 http fetch GET 500 http://localhost:5984/registry/_design/app/_rewrite/couchapp 70035ms attempt #3
33 silly fetchPackageMetaData error for semver@4 500 Internal Server Error: semver@4
34 silly fetchPackageMetaData error for json@^9.0.2 500 Internal Server Error: json@^9.0.2
35 silly fetchPackageMetaData error for couchapp@~0.11.0 500 Internal Server Error: couchapp@~0.11.0
36 verbose stack Error: 500 Internal Server Error: semver@4
36 verbose stack     at fetch.then.res (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:42:19)
36 verbose stack     at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
36 verbose stack     at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
36 verbose stack     at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
36 verbose stack     at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
36 verbose stack     at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
36 verbose stack     at Async._drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
36 verbose stack     at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
36 verbose stack     at Immediate.Async.drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
36 verbose stack     at runCallback (timers.js:672:20)
36 verbose stack     at tryOnImmediate (timers.js:645:5)
36 verbose stack     at processImmediate [as _immediateCallback] (timers.js:617:5)
37 verbose cwd /Users/frontend/projects/npm-registry-couchapp
38 verbose Darwin 16.7.0
39 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
40 verbose node v6.11.4
41 verbose npm  v5.5.1
42 error code E500
43 error 500 Internal Server Error: semver@4
44 verbose exit [ 1, true ]

If you can offer any tips about what to try next, or what to search, that would be most excellent. Also, I'm happy to add more code.

Upvotes: 0

Views: 339

Answers (1)

Kraken
Kraken

Reputation: 5860

It was an easy fix - I just changed the registry link to

http://localhost:5984/registry/

Upvotes: 1

Related Questions