rlidwka / sinopia Goto Github PK
View Code? Open in Web Editor NEWPrivate npm repository server
Private npm repository server
Rarely happens, but smells like a bug:
http --> ERR, req: 'GET http://registry.npmjs.org/multiparty/-/multiparty-2.2.0.tgz', error: ESOCKETTIMEDOUT
warn --> host registry.npmjs.org is now offline
error --- unexpected error: ESOCKETTIMEDOUT
Error: ESOCKETTIMEDOUT
at ClientRequest.<anonymous> (/tmp/sinopia/node_modules/request/request.js:688:19)
at ClientRequest.g (events.js:175:14)
at ClientRequest.EventEmitter.emit (events.js:92:17)
at Socket.emitTimeout (http.js:1797:10)
at Socket.g (events.js:175:14)
at Socket.EventEmitter.emit (events.js:92:17)
at Socket._onTimeout (net.js:327:8)
at Timer.unrefTimeout [as ontimeout] (timers.js:412:13)
fatal --- uncaught exception, please report this
Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (http.js:691:11)
at ServerResponse.res.setHeader (/tmp/sinopia/node_modules/express/node_modules/connect/lib/patch.js:63:22)
at ServerResponse.res.set.res.header (/tmp/sinopia/node_modules/express/lib/response.js:527:10)
at ServerResponse.res.send (/tmp/sinopia/lib/middleware.js:131:8)
at ServerResponse.res.report_error (/tmp/sinopia/lib/index.js:77:10)
at ReadTarball.<anonymous> (/tmp/sinopia/lib/index.js:165:15)
at ReadTarball.EventEmitter.emit (events.js:117:20)
at ReadTarball.<anonymous> (/tmp/sinopia/lib/storage.js:258:12)
at ReadTarball.EventEmitter.emit (events.js:117:20)
at Request.<anonymous> (/tmp/sinopia/lib/up-storage.js:271:10)
npm changed the way it is publishing packages in this commit:
npm/npm-registry-client@e9fbeb8
Sinopia will have to be changed accordingly. Also, now tarballs will now be encoded in the same big json document, say "hello" to out-of-memory kind of things. :(
Hi,
http://registry.npmjs.org/minijasminenode/
has:
"dist-tags": {
"latest": "0.2.7",
"canary": "0.3.0"
}
when asking sinopia to proxy:
uplinks:
npmjs:
url: https://registry.npmjs.org/
sinopia returns:
"dist-tags": {
"latest": "0.3.0",
"canary": "0.3.0"
}
In my case braking: https://github.com/angular/protractor/blob/master/package.json
"minijasminenode": ">=0.2.7"
Stored public modules are just for cache. Private modules are critic and must be backuped in order to completely restore sinopia if a anything happend.
At the moment, I think that Sinopia store all modules in the same storage directory.
Is it planned? Or is it just possible without big change?
Thanks
Don't make the same request to uplinks if time since last request is less than X seconds.
We should specify a list of CA valid for both local thing AND npmjs... :(
npm http 200 https://localhost/sinopia/express
npm http GET https://registry.npmjs.org/express/-/express-3.2.6.tgz
npm ERR! fetch failed https://registry.npmjs.org/express/-/express-3.2.6.tgz
http --> 304, req: 'GET https://registry.npmjs.org/underscore', bytes: 0/0
/usr/local/lib/node_modules/sinopia/node_modules/semver/semver.js:268
var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
^
TypeError: Object 1.5.2 has no method 'trim'
at new SemVer (/usr/local/lib/node_modules/sinopia/node_modules/semver/semver.js:268:19)
at compare (/usr/local/lib/node_modules/sinopia/node_modules/semver/semver.js:424:10)
at Function.gte (/usr/local/lib/node_modules/sinopia/node_modules/semver/semver.js:473:10)
at /usr/local/lib/node_modules/sinopia/lib/local-storage.js:157:14
at /usr/local/lib/node_modules/sinopia/lib/local-storage.js:116:3
at /usr/local/lib/node_modules/sinopia/lib/local-fs.js:186:6
at fs.js:266:14
at Object.oncomplete (fs.js:107:15)
I'm unable to install sinopia due to broken dependency with Express. I get the following:
npm ERR! Error: No compatible version found: express@'^3.4.7'
npm ERR! Valid install targets:
npm ERR! ["0.14.0","0.14.1","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8","2.0.0","2.1.0","2.1.1","2.2.0","2.2.1","2.2.2","2.3.0","2.3.1","2.3.2","2.3.3","2.3.4","2.3.5","2.3.6","2.3.7","2.3.8","2.3.9","2.3.10","2.3.11","2.3.12","2.4.0","2.4.1","2.4.2","2.4.3","2.4.4","2.4.5","2.4.6","2.4.7","2.5.0","2.5.1","2.5.2","2.5.3","2.5.4","2.5.5","2.5.6","2.5.7","2.5.8","2.5.9","2.5.10","2.5.11","3.0.0","3.0.1","3.0.2","3.0.3","3.0.4","3.0.5","3.0.6","3.1.0","3.1.1","3.1.2","3.2.0","3.2.1","3.2.2","3.2.3","3.2.4","3.2.5","3.2.6","3.3.0","3.3.1","3.3.2","3.3.3","3.3.4","3.3.5","3.3.6","1.0.0-beta","1.0.0-beta2","1.0.0-rc","1.0.0-rc2","1.0.0-rc3","1.0.0-rc4","2.0.0-beta","2.0.0-beta2","2.0.0-beta3","2.0.0-rc","2.0.0-rc2","2.0.0-rc3","3.0.0-alpha1","3.0.0-alpha2","3.0.0-alpha3","3.0.0-alpha4","3.0.0-alpha5","3.0.0-beta1","3.0.0-beta2","3.0.0-beta3","3.0.0-beta4","3.0.0-beta6","3.0.0-beta7","3.0.0-rc1","3.0.0-rc2","3.0.0-rc3","3.0.0-rc4","3.0.0-rc5","3.3.7","3.3.8","3.4.0","3.4.1","3.4.2","3.4.3","3.4.4","3.4.5","3.4.6","3.4.7","3.4.8","4.0.0-rc1","4.0.0-rc2"]
Perhaps Express changed upstream recently?
https://registry.npmjs.org/esprima-fb/2001.1001.0000-dev-harmony-fb
This specific package/version seems to end up in the toplevel sinopia package.json as
"2001.1001.0-dev-harmony-fb": {
"name": "esprima-fb",
"description": "Facebook-specific fork of the esprima project",
"homepage": "https://github.com/facebook/esprima/tree/fb-harmony",
"main": "esprima.js",
"bin": {
"esparse": "./bin/esparse.js",
"esvalidate": "./bin/esvalidate.js"
},
"version": "2001.1001.0-dev-harmony-fb",
it looks like Sinopia is altering the version number and shortening 0000 to 0
from the current documentation it is very unclear how to limit specific new users you have created to a specific package(or prefix). In addition does "all" mean anyone (authenticated or not) or all authenticated, is there even an option for the later? there may be some other specifics that are not documented in the readme that i have not thought of or are in other sections too.
We saw this, when installing https://www.npmjs.org/package/zombie
Via Sinopia Version 2.0.0-alpha9 is installed, without it 2.0.0-alpha31 will be used.
I guess this is not the behaviour it should be, right?
A crafted request like this:
PUT /sinopia/user%2frepo HTTP/1.1
accept: application/json
content-type: application/json
content-length: 7
Connection: keep-alive
"0.6.0"
Can cause an invalid tag to be inserted, and cause issues in npm later.
Not a big deal unless you're using github dependencies with a package name that doesn't exist in repository.
need to add that
Need a config option to execute a custom script (deployment thingy) when a package is published.
i have a small team, I want to give all users the ability to publish private packages. is there a way to do this? I tried "allow_publish: all" or commenting it out. neither seems to work.
Sinopia is crashing when starting from the cli on node 0.10.25/win64:
It seems like it should call process.getuid, not process.getuid():
$sinopia
Error:
c:\Users\USER\AppData\Roaming\npm\node_modules\sinopia\lib\cli.js:3
if (process.getuid() === 0) {
^
TypeError: Object # has no method 'getuid'
at Object. (c:\Users\georg.zoeller\AppData\Roaming\npm\node_modules\sinopia\lib\cli.js:3:13)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (c:\Users\georg.zoeller\AppData\Roaming\npm\node_modules\sinopia\bin\sinopia:3:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
We noticed this because we had multiple sinopias behind a load balancer where NPM would get the toplevel on one instance and request the tgz directly on another. Although your normal use case probably doesn't account for load balancers, I would think it's possible that someone clearing out their sinopia cache will experience clients requesting a tarball without first asking for the package json or otherwise attempt to manually download tarball links.
Ideally it should check if it has the package first and pull from upstream otherwise.
Can you confirm? Would you prefer us to PR fixes, do you want to address it, or would this be a won'tfix/won'tmerge?
...
I found sinopia while researching the best way to mirror the npm registry, and I'm running into an issue that may stem from my misunderstanding of npm. Please forgive me if there's a more appropriate place for this.
I've got sinopia up and running perfectly on an Ubuntu VM, and I can successfully download the modules defined in my project's package.json. However, I noticed that there are still some GET requests that are hitting registry.npmjs.org. I looked into some of the package.json files used by plugins in my node_modules directory, and I noticed lines like this:
"_from": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-0.2.0.tgz",
"_resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-0.2.0.tgz"
These match the URLs being hit when I run 'npm install'. There are several more.
I experimented with what would happen if I made registry.npmjs.org unreachable (by turning off my network card). My next 'npm install' failed with "fetch failed" errors on each of the registry.npmjs.org URLs.
Any suggestions would be much appreciated.
Edit:
It looks like I neglected to consider what effect the presence of an npm-shrinkwrap.json file would have. After removing the file, my issue looks resolved.
Sinopia seems to be having trouble handling most of the grunt related json files at this time.
It causes a 500 internal error and server restart.
I think it may be related to strictness/interpretation of JSON.
I tried to install [email protected] throw npm install -g [email protected] behind my company proxy as npm set proxy http://companyproxy;port/ and with npm set registry https://registry.npmjs.org/, so it failed with error : npm ERR not ok code 0
this what i get in npm-debug log file:
4033 silly lockFile 4bf1555c-forever-agent-0-5-0 [email protected]
4034 silly lockFile 4bf1555c-forever-agent-0-5-0 [email protected]
4035 verbose tar unpack C:\Users\tuto\AppData\Roaming\npm-cache\aws-sign2\0.5.0\package.tgz
4036 silly lockFile 86a86559-pm-cache-aws-sign2-0-5-0-package tar://C:\Users\tuto\AppData\Roaming\npm-cache\aws-sign2\0.5.0\package
4037 verbose lock tar://C:\Users\tuto\AppData\Roaming\npm-cache\aws-sign2\0.5.0\package C:\Users\tuto\AppData\Roaming\npm-cache\86a86559-pm-cache-aws-sign2-0-5-0-package.lock
4038 silly lockFile 4cb30b29-ache-aws-sign2-0-5-0-package-tgz tar://C:\Users\tuto\AppData\Roaming\npm-cache\aws-sign2\0.5.0\package.tgz
4039 verbose lock tar://C:\Users\tuto\AppData\Roaming\npm-cache\aws-sign2\0.5.0\package.tgz C:\Users\tuto\AppData\Roaming\npm-cache\4cb30b29-ache-aws-sign2-0-5-0-package-tgz.lock
4040 silly lockFile fa463915-forever-agent-0-5-0 forever-agent@0.5.01\AppData\Local\Temp\npm-3912-4sbmSknC\1386843775016-0.7573030390776694\package
4041 silly lockFile fa463915-forever-agent-0-5-0 forever-agent@0.5.01\AppData\Local\Temp\npm-3912-4sbmSknC\1386843775016-0.7573030390776694\package
4042 silly gunzTarPerm extractEntry .travis.yml
4043 silly lockFile 4a472fed-75016-0-7573030390776694-package tar://C:\Users\TUTO
4044 silly lockFile 4a472fed-75016-0-7573030390776694-package tar://C:\Users\TUTO
4045 silly gunzTarPerm modes [ '755', '644' ]
4046 silly lockFile 12c3f96f-e-range-parser-0-0-4-package-tgz tar://C:\Users\tuto\AppData\Roaming\npm-cache\range-parser\0.0.4\package.tgz
4047 silly lockFile 12c3f96f-e-range-parser-0-0-4-package-tgz tar://C:\Users\tuto\AppData\Roaming\npm-cache\range-parser\0.0.4\package.tgz
4048 error Error: ENOENT, chmod 'C:\Users\TUTO1\AppData\Local\Temp\npm-3912-4sbmSknC\1386843776277-0.3609538197051734\package\README.md'1\AppData\Local\Temp\npm-3912-4sbmSknC\1386843776277-0.3609538197051734\package\README.md
4049 error If you need help, you may report this log at:
4049 error http://github.com/isaacs/npm/issues
4049 error or email it to:
4049 error [email protected]
4050 error System Windows_NT 6.1.7601
4051 error command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
4052 error cwd C:\Users\tuto\AppData\Roaming\npm\node_modules\sinopia
4053 error node -v v0.10.19
4054 error npm -v 1.3.11
4055 error path C:\Users\TUTO
4056 error fstream_path C:\Users\TUTO~1\AppData\Local\Temp\npm-3912-4sbmSknC\1386843776277-0.3609538197051734\package\README.md
4057 error fstream_type File
4058 error fstream_class FileWriter
4059 error fstream_finish_call chmod
4060 error code ENOENT
4061 error errno 34
4062 error fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:305:19
4062 error fstream_stack Object.oncomplete (fs.js:107:15)
4063 verbose exit [ 34, true ]
can any one help me plzz
Getting this error:
➜ widgetgit:(master) ✗ npm publish
npm ERR! publish Failed PUT response 403
npm ERR! Error: user anonymous not allowed to publish it : widget
npm ERR! at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:272:14)
npm ERR! at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/index.js:148:22)
npm ERR! at Request.EventEmitter.emit (events.js:98:17)
npm ERR! at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/index.js:891:14)
npm ERR! at Request.EventEmitter.emit (events.js:117:20)
npm ERR! at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/index.js:842:12)
npm ERR! at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR! at _stream_readable.js:920:16
npm ERR! at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
npm ERR! System Darwin 12.3.0
npm ERR! command "node" "/usr/local/bin/npm" "publish"
npm ERR! cwd /Users/paolo.delmundo/Opower/paolo-delmundo/widget
npm ERR! node -v v0.10.17
npm ERR! npm -v 1.3.8
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/paolo.delmundo/Opower/paolo-delmundo/widget/npm-debug.log
npm ERR! not ok code 0
However, If I do npm whoami, I get:
admin
for output, same as npm does
If I execute: npm search _my_package_
it gives me an error:
npm ERR! SyntaxError: Unexpected token C
npm ERR! Cannot GET /-/all/since?stale=update_after&startkey=1386675384891
npm ERR!
npm ERR! at Object.parse (native)
npm ERR! at RegClient. (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:235:23)
npm ERR! at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/index.js:142:22)
npm ERR! at Request.EventEmitter.emit (events.js:98:17)
npm ERR! at Request. (/usr/local/lib/node_modules/npm/node_modules/request/index.js:856:14)
npm ERR! at Request.EventEmitter.emit (events.js:117:20)
npm ERR! at IncomingMessage. (/usr/local/lib/node_modules/npm/node_modules/request/index.js:808:12)
npm ERR! at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR! at _stream_readable.js:895:16
npm ERR! at process._tickCallback (node.js:415:13)
It seems that the output from sinopia is not compatible with the parser of npm-search (I only tried with a non-existent package, I can't test with an existing one right now).
This are my current versions:
node --version
v0.10.5
npm --version
1.2.18
sinopia --version
0.5.5
Hi,
Can you add the package.json file to the repository?
That way people can install directly from the repo, because sometimes the version on npmjs.org is outdate, like now, there's a bug on dist-tags.
I was working on the fix, when I saw that you already fixed it with the latest changes, so thank you ;)
It base on MySQL and Simple file store.
When running on Windows, the first attempt to publish a package crashes the whole process via a C/C++ error.
See baudehlo/node-fs-ext#30 for more details.
I start with install sinopia version 0.4.3 and it finish well.Then, I configured the registry as: npm set registry http://localhost:4873/
So after that I tried to download some package and it didn't work and i have got that;
C:\Users\tuto>npm install grunt
npm http GET http://localhost:4873/grunt
npm http 407 http://localhost:4873/grunt
npm ERR! TypeError: Cannot call method 'match' of undefined
npm ERR! at RegClient. (C:\Program Files\nodejs\node_modules\npm
node_modules\npm-registry-client\lib\request.js:119:29)
npm ERR! at cb (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-re
gistry-client\lib\request.js:158:9)
npm ERR! at RegClient. (C:\Program Files\nodejs\node_modules\npm
node_modules\npm-registry-client\lib\request.js:252:14)
npm ERR! at Request.self.callback (C:\Program Files\nodejs\node_modules\npm
node_modules\request\request.js:129:22)
npm ERR! at Request.EventEmitter.emit (events.js:98:17)
npm ERR! at Request. (C:\Program Files\nodejs\node_modules\npm\no
de_modules\request\request.js:873:14)
npm ERR! at Request.EventEmitter.emit (events.js:117:20)
npm ERR! at IncomingMessage. (C:\Program Files\nodejs\node_module
s\npm\node_modules\request\request.js:824:12)
npm ERR! at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR! at streamreadable.js:920:16
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "grunt"
npm ERR! cwd C:\Users\tuto
npm ERR! node -v v0.10.19
npm ERR! npm -v 1.3.11
npm ERR! type non_object_property_call
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\tutp\npm-debug.log
npm ERR! not ok code 0
So what Iam supposed to do???
Since this was accepted, and npm will be able to understand it soon.
Your latest patch still dies on semantic version tags for grunt. Please consider changing semver.compare to semver.compareLoose in two places in storage.js.
since npm is now uploading package using just one big json, 1mb default limit isn't enough
maybe make it configurable, like nginx's client_max_body_size
Seems like the publish behaviour is always to add dist-tag latest.
This is the same in real npm-www but there you can override it with publishConfig.
It there anyway to set the npm install --tag
to override latest? or at least honor publishConfig as npm-www does.
See npm/npm#4837
If a package contains version with a tarball we didn't succeed in downloading in previous 5 minutes or so (because of remote server failure or 404), we shouldn't include this version to a result.
So user can run npm install foo
multiple times and get less and less versions until he successfully gets a tarball.
I use sinopia for a private repo hosted on our company servers and I need to pass through a proxy to reach public servers. As it is sinopia is not able to send requests for the public npm registry on my server.
If you are not interested in implementing this feature for now, could you please point me in the right direction to do it (where the request to uplinks are sent, especially when we GET dependencies of a module)
Your README states:
If you want to use a database instead, ask for it, we'll come up with some kind of a plugin system.
I'd like to run sinopia on Heroku, which doesn't have a persistent filesystem. I haven't used sinopia yet at all -- how hard would it be to add support for something like S3, postgres, redis, or otherwise?
Sinopia keeps its own small database and, if a package doesn't exist there, it asks npmjs.org for it keeping only those packages you use.
Can we allow the user to configure the fallback registry?
If two servers set up to upload packages to each other, and we try to upload it, servers get stuck in a loop.
We should first upload it locally, and only after that forward request to uplinks. Fallback using #3 if fails.
If there's an error raised while updating versions—for example, the JSON file can't be written—sinopia fails silently. The reason is the empty callback in Storage::get_package
.
When running "npm install express" it is fetching 4.0.0-rc2 - This is the development version. When running "npm install express" against default registry I get version 3.4.8 - the latest stable as expected.
I have my admin user setup and the generated password in sinopia. How do I now install or publish a package?
Does npm use _auth and email from the .npmrc file? so is email=admin then?
I'm having an issue with packages from uplinked registries. Sinopia successfully downloads them (npm install
works fine), however, the temp files are never being renamed. I poked around and found that the callback that renames the file is never being called.
I can't seem to find them anywhere. Not sure if they are cached at all. I am using the default config.yaml. storage is set at ./storage. The directory is empty after i do a npm install. I thought sinopia will cache the npm packages my app uses here.
I am getting a "shasum check failed" error when I try to install grunt-karma through sinopia. These are the steps I am using to reproduce it:
sudo npm install -g sinopia
sudo sinopia
In another terminal:
sudo npm --registry http://localhost:4873/ install grunt-karma
This is the error I get:
npm ERR! Error: shasum check failed for /home/iambrandonn/tmp/npm-2251-t4kF0HXV/1385055608176-0.16491078841499984/tmp.tgz
npm ERR! Expected: 03726561bc268f2e5444f54c665b7fd4a8c029e2
npm ERR! Actual: 5deb6b4cf7b15a5e86ba577c02df380e5edb6904
npm ERR! at /usr/bin/node10.21/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR! at ReadStream. (/usr/bin/node10.21/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR! at ReadStream.EventEmitter.emit (events.js:117:20)
npm ERR! at _stream_readable.js:920:16
npm ERR! at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]
npm ERR! System Linux 3.11.0-13-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "--registry" "http://localhost:4873/" "install" "grunt-karma"
npm ERR! cwd /home/iambrandonn/temp
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.11
If I don't install through sinopia it works fine.
Feature request.
The main reason for not having registration right now is the fact that we can't modify config file to add new users.
Maybe another file would solve this. htpasswd
maybe? There are a few tools that work with it already.
Error: ENOENT, no such file or directory '../package.yaml'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.readFileSync (fs.js:284:15)
at Object.<anonymous> (/home/alex/applications/sinopia/node_modules/sinopia/bin/sinopia:6:28)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
Hey Alex:
An alternative I've been working on is docker-npmjs
which provides a private npmjs repo and proxies other requests to the public registry, similar to what you've done here.
[sinopia-714 (out) 2013-12-26T13:41:47] http <-- 500, user: undefined, req: 'GET /nodemailer/-/nodemailer-0.5.15.tgz?', error: bad uplink status code: 406
[sinopia-714 (out) 2013-12-26T13:41:47] http --> 406, req: 'GET http://registry.npmjs.org/nodemailer/-/nodemailer-0.5.15.tgz', bytes: 0/134
needs investigation
I've found that anonymous users ("npm adduser" has not yet been run) are allowed to download packages from Sinopia... which is what I would expect. However, I've also found that if a user has run "npm adduser", possibly because of using registry.npmjs.org instead of Sinopia, AND that user is not set up in the config file... the user is rejected from even downloading packages. I would expect rejection for publishing, but not downloading.
I see two possible solutions. If the basic_auth middleware were placed lower in index.js after all the routes that accept anonymous users but before any route that required auth... that might solve the problem. The other idea is to not fail a request immediately on bad auth, but let the route check when and if the user is needed. At that point the request could fail if anonymous users are not ok.
I am willing to work on either solution and submit a PR if you like, but want to get your opinion before putting any work into it.
This message appears as soon as i do my first npm install from the root of my application (after installing sinopia and running it, a)
Of course, If i set npm registry back to npmjs.org, it works fine.
Hi Alex, I love this project - it's exactly what I was looking for =]
Would you be able to put up a license for usage?
All the best, Lee
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.