anvaka / npmgraph.an

2d visualization of npm

Home Page:https://npm.anvaka.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Private NPM Registry

marcellodesales opened this issue · comments

How to setup this to be used by a private NPM registry?

I tried changing https://github.com/anvaka/npmgraph.an/blob/master/src/scripts/config.js#L1 with my registry

I'm getting the following error while loading the app in the browser

screen shot 2016-02-08 at 11 35 01 am

## Questions - Can I use it for private Registries/Proxy? - Does it support Scoped modules?

Thanks and awesome Job!
Marcello

I've never tried this myself.

Couple questions:

  1. If you don not modify config.js - does it work?
  2. If step 1 works, try cloning https://github.com/anvaka/corsregistry and set endpoint to the root of your proxy (https://registry.npmjs.mycompany.net) - would it work?

No response, closing. Please reopen if you have more feedback.

@anvaka Sorry I did not see your response on time...

So, here's the primary difference between the output of the servers:

https://skimdb.npmjs.com/registry/_design/scratch/_view/byField

{"total_rows":267661,"offset":0,"rows":[
{"id":"0","key":"0","value":{"name":"0","version":"0.0.0","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"scripts.test":"echo \"Error: no test specified\" && exit 1","author":"","license":"BSD-2-Clause","_id":"0@0.0.0","dist":{"shasum":"beabacb0a099c1dd215eaec15bb201318db7de6a","tarball":"http://registry.npmjs.org/0/-/0-0.0.0.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"zolmeister","email":"zolikahan@gmail.com"},"maintainers":[{"name":"zolmeister","email":"zolikahan@gmail.com"}]}},
{"id":"0.0","key":"0.0","value":{"name":"0.0","version":"0.0.0","description":"ready","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"scripts.test":"echo \"Error: no test specified\" && exit 1","author":"","license":"MIT","_id":"0.0@0.0.0","_shasum":"62b0187e11da7ef5f648568c756963d0fdffe607","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.2","_npmUser":{"name":"spikef","email":"Spikef@Foxmail.com"},"dist":{"shasum":"62b0187e11da7ef5f648568c756963d0fdffe607","tarball":"http://registry.npmjs.org/0.0/-/0.0-0.0.0.tgz"},"maintainers":[{"name":"spikef","email":"Spikef@Foxmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/0.0-0.0.0.tgz_1461563004932_0.8684320959728211"}}},
{"id":"0.0.1","key":"0.0.1","value":{"name":"0.0.1","version":"1.0.1","description":"This module is belong to tanawat khwanrod","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"scripts.test":"echo \"Error: no test specified\" && exit 1","author":{"name":"tanawat khwanrod"},"license":"ISC","dependencies":{"express":"^4.13.3"},"_id":"0.0.1@1.0.1","_shasum":"d74d77fbad42b7c7aacb6094f694c8db25a3df5d","_from":".","_npmVersion":"2.14.3","_nodeVersion":"4.1.0","_npmUser":{"name":"hall","email":"tanawat025tot@gmail.com"},"dist":{

https://registry.npmjs.mycompany.net/_design/scratch/_view/byField

{
error: "failed to proxy package JSON from remote"
}

I will check with NPM and verify what the problem is.

commented

would love to get step by steps on how to continue progressing this direction.

When hitting the proxy http://localhost:3000/registry/_design/

{
error: "Not found on remote"
}

However http://localhost:3000/registry/ works

Try pointing registryUrl to your endpoint now . I slightly changed the way graph builder works, so maybe it will help with graph generation at least.

Autocomplete for the search field will likely remain broken - I don't have enough knowledge about private npm registries to understand why byField view returns no data.