Coder Social home page Coder Social logo

Comments (6)

aredridel avatar aredridel commented on June 10, 2024

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.
  • You're running an ancient npm.

from kappa.

jasisk avatar jasisk commented on June 10, 2024

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.

from kappa.

jasisk avatar jasisk commented on June 10, 2024

Closing this due to inactivity but feel free to continue the conversation if necessary. 😀

from kappa.

program247365 avatar program247365 commented on June 10, 2024

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!

from kappa.

jasisk avatar jasisk commented on June 10, 2024

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. 😀

from kappa.

terinjokes avatar terinjokes commented on June 10, 2024

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.

from kappa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.