remixz/umi

Not Working on Ubuntu

Closed this issue · 2 comments

Hey, I currently get an error trying to run this on my Ubuntu Server using npm run dev

(node:6595) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Exited with code 3

Node v6.11.1
NPM 3.10.10
Ubuntu 16.04.2 LTS.

I think this is caused by the dev server trying to open the browser automatically, but if you're on a server, which wouldn't have a GUI to open one in, it won't work. Try setting this line https://github.com/remixz/umi/blob/master/config/index.js#L27 to autoOpenBrowser: false. Let me know if that works!

One other note: If you're wanting to host your own Umi player, I'd recommend running npm run build, and then serving the contents of /dist with a static server. To make it work like https://umi.bruggie.com does, you'd need to have a rule so that the routes return the index.html page, since this is a single-page app. With nginx, you'd add something like this to your conf:

location / {
    try_files $uri dist/index.html;
}

Making sure to set the right path.

Using npm run dev builds the project in development mode, which isn't minified, plus has some features like logging the watch history disabled (mostly because I don't want to spam my history when I test new things 😅).

Closing due to inactivity.