sinopia
sinopia copied to clipboard
Unable to resolve dependencies like "@angular/common"
Hi,
Angular2 RC was released today and they have changed names of their packages so it looks like this.
"@angular/common": "2.0.0-rc.0", "@angular/compiler": "2.0.0-rc.0", "@angular/core": "2.0.0-rc.0", "@angular/http": "2.0.0-rc.0", "@angular/platform-browser": "2.0.0-rc.0", "@angular/platform-browser-dynamic": "2.0.0-rc.0", "@angular/router-deprecated": "2.0.0-rc.0", "@angular/upgrade": "2.0.0-rc.0"
When using standard npm registry it works ok, but if using sinopia it will fail because of following error. http <-- 404, user: username, req: 'GET /@angular%2fcommon', error: no such package available
That means sinopia can`t be used with angular2 RC. Thank you for your help :)
Ok i changed configuration, because it was not using proxy setting but now there is an error.
http --> 404, req: 'GET http://registry.npmjs.org/%40angular%2Fcommon', bytes: 0/75 request to 'http://registry.npmjs.org/@angular%2Fcommon' works, but '@' character is url encoded which is causing problem
Ok as i see it this problem was fixed 13.7.2015, but last version published to npm was 7.6.2015 that means fix is not present in version that can be downloaded using npm.
If anyone has this problem, workaround for this is:
Option 1: in sinopia/lib/up-storage.js
change code on line number 10
var encode = function(thing) {
return encodeURIComponent(thing).replace(/^%40/, '@');
};
Option 2: set npm scoped registry to npmjs.org
npm config set "@angular:registry" http://registry.npmjs.org/
Do we know when/if this update will be pushed to npm?
(By the way thanks for the option 1 fix)
Awesome, thanks for the fix.
+1 for: is it going to be pushed to npm?
+1 for: next release with this fix.
I wouldn't count on a fix.. nothing has been published for 11 months. This project looks dead to me. Verdaccio is a fork of sinopia, but doesn't have anything published on npm yet.
https://github.com/verdaccio/verdaccio
The master branch works fine if you put a proxy for "@*" in the config.yaml. However the npm version is a very old version.
On Fri, May 20, 2016 at 2:52 AM, themauveavenger [email protected] wrote:
I wouldn't count on a fix.. nothing has been published for 11 months. This project looks dead to me. Verdaccio is a fork of sinopia, but doesn't have anything published on npm yet.
https://github.com/verdaccio/verdaccio
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/rlidwka/sinopia/issues/399#issuecomment-220417013
Thanks & Regards, Daniel
Hi,
sorry for bumbing the this, But I ran in the same issue. I went for option 1. up-storage.js look now like this:
var encode = function(thing) { return encodeURIComponent(thing).replace(/^%40/, '@'); };
Nonetheless I get the same error message:
http <-- 404, user: undefined, req: 'GET /@angular%2fcommon', error: no such package available
Does anyone have some more suggestions?
Cheers Tobias
Hi, first you must update your config.yaml section:
packages:
'@*/*':
# scoped packages
access: $all
publish: $authenticated
proxy: npmjs
in default config.yaml there is no proxy setting. Have a nice day
Hi,
thanks for your help. Now it works.
Cheers Tobias
Have the same issue. Waiting for fix )
Had to patch my local docker instance using the replace trick above. Docker let's you patch individual files so I simply -v
over the top of the up-storage.js
with a version with the fix. If you are running this in a docker container, it's another way to fix the issue.
+1
Same... @rlidwka please publish or add some other maintainers.... this project has a massive following.
@kukjevov fixed for me... why that isn't in the default I don't know...
@kukjevov @MeirionHughes please see #376
Could get it working by following this blogpost.
We have the same problem with sonatype nexus as proxy repository.
C:\WKS\NodeJS\QuickStart>npm config list
; cli configs
user-agent = "npm/3.10.7 node/v6.5.0 win32 x64"
; userconfig C:\Users\ap284\.npmrc
@angular:registry = "http://nexus.lan.huk-coburg.de/content/repositories/npmjs/"
cache = "C:\\Lokal\\nodejs\\npm-cache"
registry = "http://nexus.lan.huk-coburg.de/content/repositories/npmjs/"
; node bin location = C:\Program Files\nodejs\node.exe
; cwd = C:\WKS\NodeJS\QuickStart
; HOME = C:\Users\ap284
; "npm config ls -l" to show all defaults.
@cniweb , I met the same problem as you that 'with sonatype nexus as proxy repository', did you get that resolved yet ?
@jaylu Yes, I use Nexus 3 now!
You might need to check http://stackoverflow.com/questions/4390436/need-to-allow-encoded-slashes-on-apache
use https://github.com/verdaccio/verdaccio and nenux solve my problem
@decrypted thanks, this solve my issue
I had the same issue with Nexus 3.6.2, reverse-proxied by apache.
URLs like https://nexus.../repository/npm-group/@angular%2fhttp
were returning 404.
@decrypted solved it with your suggestion:
eb2pr-app06:/etc/httpd/conf.d $ sudo /usr/bin/diff nexus.conf nexus.conf.20190123
33d32
< AllowEncodedSlashes On
60d58
< AllowEncodedSlashes On
Thanks!