'run' command doesn't work, events.js error
Prodyte opened this issue · comments
I found this to be fixed by removing the spawn of a browser session. This is the minimal code for your own run.js
(assuming your stuff is in dist/ and this is in the parent directory). You can use node run.js
to run the webserver
const express = require('express');
const path = require('path');
const outDir = path.resolve('./dist/' || process.env.OUT_DIR);
const app = express();
app.use(express.static(`${outDir}`));
app.get('/', function(req,res) {
res.sendFile('/index.html');
});
app.listen(8000, function() {
console.log('running on port 8000');
});
On which OS are you?
Edit: I can see the debian sign in the image but is it plain debian or another debian-based distro?
On which OS are you?
Edit: I can see the debian sign in the image but is it plain debian or another debian-based distro?
Plain debian
I think the error is caused by this package that opens up the website on your default browser but chrome isn't able to open it . If you guys want i can remove that package and only output the port on which the website would be running and you can manually open it.
I'd definitely prefer it as it doesn't work on servers without monitors or browser installed
The issue has been fixed in latest release v0.1.5 (hopefully feel free to re-open the issue if hasn't been) 😄🙌