-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add scoped packages #104
Comments
Happened to be messing with this yesterday as well, although I couldn't find any really clean way to make it happen. I eventually settled on a string replace in a few files so that it would create the right files/folders and return the right url to the tarball. |
👍 i'd love to see this feature in sinopia. this could save a lot of trouble |
+1 I would think this is the primary use case of sinopia now that scoped packages are implemented. |
The only thing to do is accept @org/ format on the package name? |
@jasonrm 10x |
@danieltdt that should do it, I think. yes. |
+1 @rlidwka, I would be willing to put some work into a pull request on this unless it's being actively worked on already? Had a quick look, and there's more than just accepting the package name, as it needs to fit into the flat file structure as well, want to chat about implementation at all? |
It's already there, in this commit I believe: a425c5e I just published it as
I prefer to keep it structured like node_modules, so it won't be flat anymore. I guess search will stop working again. :( |
Noice, much obliged publishing that, works a treat. |
Installing scoped packages from 1.0.0-alpha does not work.
generates url
but sinopia only works with the following url
This will need aliasing to work properly with npm v2.1.8 |
oh crap, I guess it's called "alpha" for a reason. Reopening... |
👍 would be awesome to have this working 😸 |
@drewwells heads up that your working URL is wrong (at least on my local box).
still fails; however:
works. It looks like the formula here is:
Still trying to work out a fix. |
@drewwells 7a32cf2 fixes the issues we are having. It's not the most elegant solution however, after digging through the source for a few hours, I couldn't figure out a clean-er integration point. I suspect @rlidwka would prefer a less hacked solution before he merges into master and we may want to rebuild our container based on my feature branch in the meantime. |
Can we build from this commit and get a working sinopia for our use case?
|
@drewwells definitely. just issued a pull request to your docker-sinopia repo that will do just that. check out drewwells/docker-sinopia#2 for the change. |
Just adding a +1; I'd really appreciate support for scoped packages! Sounds like you're almost there, but if there's anything I can do I'm happy to help. |
We're publishing and downloading scoped packages thanks to Kyle's fixes. On Wed Dec 03 2014 at 8:28:23 AM Mark Stickley [email protected]
|
Fixed in 06bb301 and published as For anyone, who is interested: sinopia is actually overwriting this url with its own, and that code didn't work correctly with scoped packages. Now it does. Also, cleaned up a bit of over-engineering there... |
👍 |
Great stuff, thanks!
|
💥 👍 |
I just tried publishing a scoped package but got an error. It's quite likely that I'm doing something wrong but I'd appreciate some advice, please! $ npm publish
npm ERR! publish Failed PUT 403
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "publish"
npm ERR! node v0.10.33
npm ERR! npm v2.1.11
npm ERR! code E403
npm ERR! user marks not allowed to publish it : @bb%2fnpmscopedmodule
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/marks/workspace/jspm_poc/modules/npmscopedmodule/npm-debug.log Here's the Sinopia output:
And the NPM debug log:
|
@markstickley , what's your config file for sinopia? The issue could be that |
@rlidwka Yep, that was it: I needed to add '@*/*':
# scoped packages
allow_access: $all
allow_publish: $authenticated to my config as I had upgraded from a previous version without support for scoped packages. Thanks :) |
If I'm not mistaken, this only works, if we put the However there is a part in the npm-config for the scope value. Furthermore, as described here, you can associate a scope with a registry at login, e.g.
In my ~/.npmrc I see
So in my head it should work like this:
Am I missing something? |
Name should include scope. |
Then what's the difference between this, and naming all my modules something like |
The difference is that you could set up Yes, it doesn't give much benefits with sinopia, because it can forward requests to npmjs anyway. But it has its uses. |
I get it, on the usage side, it's clearly a benefit. Although i hoped that the |
Hi, does somebody has this working behind a nginx server with a custom path ? The problem is that nginx seems to "decode" the URI before passing it to the backend
I tried 2 different nginx configs, with the same result:
|
We host ours via an nginx proxy. Perhaps try our docker container and see if that works better for you: https://registry.hub.docker.com/u/drewwells/sinopia/ |
We also host via an nginx proxy. https://registry.hub.docker.com/u/rnbwd/sinopia/ . I use a slightly different Dockerfile but also included some instructions on how to set it up with an nginx-proxy - https://github.com/jwilder/nginx-proxy |
Thanks for the answers but I am able to run sinopia behind nginx, that's not the problem and I don't need docker for that. |
@valmiRe , this is how I managed to solve this:
I don't know what side effects I'll give, but it seems to work. The fact that you can't do it with |
thanks @rlidwka , this works fine, I had to add a line in the map directive, otherwise the web interface was broken (my browser try to get url like "/sinopia//-/static/main.css")
|
Sorry I should have mentioned something months ago (maybe I did and don't remember). But I forked the repo and added one line of code that was relevant to the docker // for nginx proxy
if (process.env.VIRTUAL_HOST) app.enable('trust proxy') in the |
Would be in the next npm release, so we'll need to support that.
npm/npm#5239
The text was updated successfully, but these errors were encountered: