Closed program247365 closed 9 years ago
Not actual fixes, but some things I notice:
npm config set registry=foo
(as a separate command, before others) does the same thing as adding --registry=foo
to each command. You can't mix set with other commands all at once.Kappa is just the “intelligent” proxy. Your config should have something like the following:
{
// ... snip ...
"plugins": {
"kappa": {
"vhost": null,
"paths": [
"http://localhost:5984/registry/_design/scratch/_rewrite/",
"https://registry.npmjs.org/"
]
}
}
// ... snip ...
}
You'll find a similar structure in the example project.
You'll need to have the npm couchapp up and running locally, in that example. You could do without it just to make sure kappa is working by just having an array with the public registry in it.
If you want to set up the couchapp, it's a bit painful, but we've got a shell script that will get you most of the way there (the ini is there, too).
Lastly, while there is nothing you can set in a package.json
to define the registry, you can thrown an .npmrc
file in the root of a project with the registry
key defined and it'll do what you want.
Closing this due to inactivity but feel free to continue the conversation if necessary. :grinning:
Sorry all, got pulled away on other things.
@jasisk
Lastly, while there is nothing you can set in a package.json to define the registry, you can thrown an .npmrc file in the root of a project with the registry key defined and it'll do what you want.
Thank you! Needed that.
Ah ok, wasn't clear to me that couchdb was the backing store from the README of kappa, etc. (no mention of it) Perhaps if one had setup a local npm registry before, maybe that would have been obvious. Perhaps a good place to mention such a thing?
I may look at some of the other projects that setup a npm registry for you in one fell swoop (either by npm install, or docker container).
@aredridel Thank you for pointing those things out!
You guys were awesome. Thanks!
Perhaps a good place to mention such a thing?
Good point. I'll add it.
I may look at some of the other projects that setup a npm registry for you in one fell swoop (either by npm install, or docker container).
@terinjokes was maintaining a docker image for kappa, and then a vanilla couchapp image. Not sure he still is, but that should prove a good foundation if you want to go that route.
You guys were awesome. Thanks!
Happy to help. :grinning:
While I'm not currently maintaining a Docker image, getting it right is hard, and at the time, Docker's networking stack didn't do what I wanted, eventually I'll get back to it. In the meantime, I'm happy to answer questions.
I'm probably a complete noob, but, what am I missing here? Am I missing that I need to setup a registry backing Kappa? https://github.com/rvagg/npmjs.org/blob/6793c71165934423f1989f54a754a6691a94f3b0/README.md
On the Kappa instance itself, I can
And I at least see in the running Kappa instance, it 404 on this request.
If I try on my local machine...
Error log
Further, once I figure out my issue, is there a way to set in our package.json for the myproject we're working on, so that whenever you 'npm install', within the project that has package.json, it will always try our local kappa instance? Or does a person always have to 'npm set registry' first?
Any help is appreciated for helping me understand the setup end-to-end.