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

Serve not working in Ubuntu 16.04 64bit #111

Closed
cschweda opened this issue Feb 15, 2017 · 9 comments
Closed

Serve not working in Ubuntu 16.04 64bit #111

cschweda opened this issue Feb 15, 2017 · 9 comments

Comments

@cschweda
Copy link

cschweda commented Feb 15, 2017

Not sure if this is a known issue -- or an issue with my specific configuration -- but even after installing globally in Ubuntu 16.04 64 via:

npm i serve -g

And then running against files in a static directory (a Vue.js build):

serve ./dist

The terminal displays that the server started, gives the two sets of URLs, and then goes right back to the command line.

No errors -- but it immediately stops serving.

Anyone else see this?

(Just as a sanity check, I installed http-server gloabally via npm, ran it against the same static directory, and all is well. Files are served fine via localhost.)

Thoughts?

PS -- Not that it should matter, but I'm running Ubuntu via VMWare on a Windows box with 4 gigs ram to the vm.

cschweda@ubuntu:~/Webdev/test01$ serve dist

   ┌─────────────────────────────────────────────────────┐
   │                                                     │
   │   Serving!                                          │
   │                                                     │
   │   - Local:            http://localhost:3000         │
   │   - On Your Network:  http://192.168.229.131:3000   │
   │                                                     │
   │                                                     │
   │                                                     │
   └─────────────────────────────────────────────────────┘

cschweda@ubuntu:~/Webdev/test01$ node -v
v7.5.0
cschweda@ubuntu:~/Webdev/test01$ npm -v
4.1.2
cschweda@ubuntu:~/Webdev/test01$ 
@DavidBruant
Copy link

DavidBruant commented Feb 17, 2017

I confirm this bug. I'm running Ubuntu without a VM.

$ serve -v
3.3.1

@DavidBruant
Copy link

I tried and had the same bug with
serve@3.3.0
serve@3.2.10
serve@3.0.0
serve@2.4.4
serve@2.4.3

For some reason, npm start works on this project. No clue what's different beyond being used as an npm script.

@cschweda
Copy link
Author

cschweda commented Feb 17, 2017

Yep -- this works when run via npm -- but not on the Ubuntu command line.

In package.json:

  "start": "serve ./dist --static",

Then:

cschweda@ubuntu$ npm run start

Works as expected. Server starts -- keeps running -- and pages are served fine.

However:

cschweda@ubuntu$ serve ./dist --static

Doesn't work. Simply goes right back to the command line.

cschweda@ubuntu$ serve -v
3.3.1

@jannisch
Copy link

I can confirm this issue on Void Linux with serve 3.3.1.

@disquisition
Copy link
Contributor

Testing this out, it looked like the issue was that when on Linux and xclip isn't installed, the copy-paste package can raise a SIGPIPE when it attempts to copy to the clipboard. The reason there's no error is that the process seems to terminate before the error lister has a chance to fire.

(Still not sure why this isn't a problem when you run serve via $ npm run start...)

@cschweda
Copy link
Author

cschweda commented Feb 19, 2017

Yep. Installed xclip -- and all is well:

cschweda@ubuntu:~$ sudo apt-get install xclip

Then:

cschweda@ubuntu:~$ serve

And everything works fine:

   ┌─────────────────────────────────────────────────┐
   │                                                 │
   │   Serving!                                      │
   │                                                 │
   │   - Local:            http://localhost:3000     │
   │   - On Your Network:  http://10.211.55.4:3000   │
   │                                                 │
   │   Copied local address to clipboard!            │
   │                                                 │
   └─────────────────────────────────────────────────┘



@cubodehelio
Copy link

serve -v
3.4.0

Stop working in Linux Mint 17.2 after update. It just get back to the console with no output at all.

@cschweda
Copy link
Author

Did you try installing xclip as mentioned above?

sudo apt-get install xclip

@cubodehelio
Copy link

Thanks @cschweda yes, that solves the problem sorry.

@leo leo closed this as completed in 83ebb04 Feb 21, 2017
disquisition referenced this issue Mar 8, 2017
It neither works, nor does it throw
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

5 participants