rlidwka / sinopia

Private npm repository server
5.51k stars 656 forks source link

Total crash on Windows 7. #138

Open tswaters opened 9 years ago

tswaters commented 9 years ago

Hi there. I had some trouble installing sinopia under windows, a few build errors relating to fs-ext and crypt3, EOENT stuff, etc. but after a few tries it seems to go and I can start it.

However, it fails when attempting to publish.... following are the commands I ran :

C:\>mkdir test-node-module && cd test-node-module

C:\test-node-module>npm set registry http://localhost:4873/

C:\test-node-module>npm adduser
Username: admin
Password: 
Email: (this IS public) (tyler.waters@gmail.com)
npm http PUT http://localhost:4873/-/user/org.couchdb.user:admin
npm http 409 http://localhost:4873/-/user/org.couchdb.user:admin
npm http GET http://localhost:4873/-/user/org.couchdb.user:admin?write=true
npm http 200 http://localhost:4873/-/user/org.couchdb.user:admin?write=true
npm http PUT http://localhost:4873/-/user/org.couchdb.user:admin/-rev/undefined
npm http 201 http://localhost:4873/-/user/org.couchdb.user:admin/-rev/undefined

C:\test-node-module>npm init   # pressed return a few times for all the defaults

C:\test-node-module>npm publish <-- this crashes sinopia

The node.exe process ends unexpectedly, there is no errors returned. this is what appears in the other cmd prompt:

C:\>mkdir sinopia && cd sinopia

C:\sinopia>sinopia
Config file doesn't exist, create a new one? (Y/n) y
===========================================================
 Creating a new configuration file: "./config.yaml"

 If you want to setup npm to work with this registry,
 run following commands:

 $ npm set registry http://localhost:4873/
 $ npm set always-auth true
 $ npm adduser
   Username: admin
   Password: snip
===========================================================
 warn  --- Server is listening on http://localhost:4873/
 http  <-- 409, user: undefined, req: 'PUT /-/user/org.couchdb.user:admin', error: bad username/password, access denied
 http  <-- 200, user: undefined, req: 'GET /-/user/org.couchdb.user:admin?write=true', bytes: 0/52
 http  <-- 201, user: admin, req: 'PUT /-/user/org.couchdb.user:admin/-rev/undefined', bytes: 210/48
 http  --> 404, req: 'GET https://registry.npmjs.org/test-node-module', bytes: 0/52

C:\sinopia>echo %ERRORLEVEL%
-1073740777

C:\sinopia>dir storage /b
test-node-module

The hex code for that error is 0xC0000417 according to msdn docs is STATUS_INVALID_CRUNTIME_PARAMETER, An invalid parameter was passed to a C runtime function.

The 'test-node-module' directory does make it's way into the 'storage' directory -- subsequent calls to publish (after restarting sinopia) fail with the following returned:

npm ERR! Error: this tarball is already present : test-node-module

Also,

C:\>node --version
v0.10.28

C:\>npm --version
1.4.9

C:\>sinopia --version
0.12.0
simonhoss commented 9 years ago

I have the same problem. Any Solution?

simonhoss commented 9 years ago

I found the problem. The problem is in fs-ext and the locking. Because locking does currently not work on windows https://github.com/baudehlo/node-fs-ext/issues/30

I made a pull request that the file will not locked on windows. #154

doublerebel commented 8 years ago

looks like this should be closed from #154's acceptance :+1: