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

Does not appear to work on Ubuntu #56

Closed
Jakobud opened this issue Mar 8, 2017 · 3 comments
Closed

Does not appear to work on Ubuntu #56

Jakobud opened this issue Mar 8, 2017 · 3 comments

Comments

@Jakobud
Copy link

Jakobud commented Mar 8, 2017

I am testing this on Ubuntu 16.04.2 (Virtualbox VM). Does not appear to work. I'm doing this:

const copyPaste = require('copy-paste')
copyPaste.copy('some text', function(){
  console.log('done')
})

Then when I try to paste anywhere in Ubuntu the text pasted is not some text but instead its the previous thing that was copied to the clipboard.

Is this an issue only because it's a virtual machine or are other people having this same problem on actual Linux systems?

@richie5um
Copy link

Hi, I've just had a copy/paste bug reported against my VSCode extension that uses this package. I think the issue is that 'xclip' - which this package uses on Linux - isn't installed by default on Debian. A quick 'apt-get install xclip' and it started working for me.

Unfortunately, this package didn't seem to report that error to me, so I had to step through the code to workout the issue.

Hope this helps.

@xavi-
Copy link
Owner

xavi- commented May 26, 2023

Errors are now more aggressively propagated in 1.5.3

@xavi- xavi- closed this as completed May 26, 2023
@xavi-
Copy link
Owner

xavi- commented May 26, 2023

Also it'd be recommended to check for errors in the callback:

copyPaste.copy('some text', function(err){
  if (err) throw err;
  console.log('done')
})

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

No branches or pull requests

3 participants