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

Regression, Red error is thrown in Js only environments #677

Open
FossPrime opened this issue Oct 19, 2021 · 2 comments · May be fixed by #730
Open

Regression, Red error is thrown in Js only environments #677

FossPrime opened this issue Oct 19, 2021 · 2 comments · May be fixed by #730

Comments

@FossPrime
Copy link

FossPrime commented Oct 19, 2021

This is also a problem on CodeSandbox, Runkit and Glitch... where unless specially configured, an attention consuming red Error is thrown. We can only use Javascript in codesandbox... apt does not work. Before the clipboard feature and the PR's to fix it... this was not a problem.

Screenshot from 2021-10-19 09-49-23

Potential solutions

  • Mute the error by default. Unless debug/verbose mode is on.
  • Upgrade to clipboardy 3.0? it includes a binary fallback for linux.

Related

@warren-bank
Copy link

warren-bank commented Feb 11, 2022

personally, I think this feature should be opt-in rather than opt-out.. but that's a matter of preference.

as-is, there are 2x ways to prevent serve from attempting to copy the server address to the clipboard:

  1. use the --no-clipboard flag
     serve -n -l 80
  2. run in a production environment
    • in bash:
       NODE_ENV='production' && serve -l 80
    • in cmd on Windows:
       set "NODE_ENV=production" && serve -l 80

@zanminkian
Copy link

Totally agree that Mute the error by default. Unless debug/verbose mode is on. Add -n flag is hard to use, because I don't want to add it every time. server . is clean and easy to use.

@zanminkian zanminkian linked a pull request Sep 14, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants