-
Notifications
You must be signed in to change notification settings - Fork 656
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
adduser gives HTTP:403 #67
Comments
I just found out that this has todo with using a proxy
the problem is that if i remove this one sinopia cant download stuff |
i now configured the very same proxy in config.yaml but i dont see an option to configure strict-ssl=false |
And after patching sinopia to pass strictSSL false to request i get random errors like
|
I was having the same problem, when running sinopia in windows. At some random times, renamimg the temporary package.json file (called package.json.tmpSOME_RANDOM_NUM) to package.json failed because a file called package.json already existed in the same folder. I first tried to unlinkSync the file before the call to rename but that failed as well. In windows unlinkSync is not that synchronous, as it will wait for any open handles to the file to close first. So, I modified the sinopia\lib\local-fs.js file to rename any existing package.json to package.json.old, then call to delete that one, before the call to rename the package.json.tmp to package.json is done. ;TDLR
add these two lines before line 59 (
It seems to work for me, although I 'd prefer a proper fix from the code owner when that's available. |
- I made various attempts to get flock working properly on windows for sinopia. They all seem to result in the process ending un-expctedly :/ - So in the short term this patch does seem to address a bunch of realworld issues people are seeing, however it also causes 3 new test breaks, so I doubt you want to actually merge it. If I have time to cycle back to this problem I might look at re-jigging it again
Derived from @korto's fix: #67 (comment)
It happens when the file exists and already opened, like this: fd = fs.createWriteStream('foo')
fs.writeFileSync('foo.tmp', 'blah')
fs.renameSync('foo.tmp', 'foo') // works on linux, fails with EPERM on windows
fs.close(fd) On unix systems you can unlink an opened file. Filesystem will just delete a reference to it, but any program can still do i/o with the deleted file. I suppose that's why it's called "unlink", not "remove". On windows you can't do that for some weird reason. Anyway, I took your suggestion with Fix published as |
I try to setup sinopia locally.
starting sinopia gives me
now i try to configure my npm to use this repo
this does not work
what could cause this problem
The text was updated successfully, but these errors were encountered: