Skip to content
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

EBUSY on 'npm publish' #96

Closed
djblue opened this issue Aug 2, 2014 · 1 comment
Closed

EBUSY on 'npm publish' #96

djblue opened this issue Aug 2, 2014 · 1 comment
Labels

Comments

@djblue
Copy link

djblue commented Aug 2, 2014

Just setup sinopia on Windows server 2012, and setup npm according to the instructions. I can connect and install modules correctly. I can't seem to publish private repositories. I ran sinopia with node-inspector and I keep getting a fs related error EBUSY. I think it might have to do with how Windows locks files so the safe write function might not work properly in Windows.

Is anybody else experiencing something similar?

Thanks.

@rlidwka rlidwka added the windows label Aug 2, 2014
@djblue
Copy link
Author

djblue commented Aug 8, 2014

Would this implementation of the write function still work? (local-fs.js)

function write(dest, data, cb) {
  var lock = dest + '.lock';
  if (!fs.existsSync(lock)) {
    mkdirp.sync(Path.dirname(dest))
    fs.writeFileSync(lock, '') 
    fs.writeFile(dest, data, function(err) {
      fs.unlinkSync(lock)
      cb(err)
    })  
  } else {
    cb({
      message: 'file locked for writing'
    })  
  }
}

I got this implementation to work in windows. Does anyone see an issue with this approach?

Thanks.

@djblue djblue closed this as completed Aug 8, 2014
doug-wade pushed a commit to doug-wade/sinopia that referenced this issue Nov 19, 2016
Docs: correct config attribute `proxy_access`

Thanks!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants