Get no response when running on Ubuntu 20.04
See original GitHub issueHi, Trainset team! I’m raising this issue for some guidance about how to deploy it locally. I’m testing it on a Ubuntu 20.04 instance. Following I gathered the behaviour I see when testing the commands on the README.md doc.
I’ve tested all mayor versions of npm from 3.0.0
to the 6.0.0
, including 6.4.1
. Of course respecting the version for nodejs --> 10.15.1
When running npm run build --report
it states that it’s listening on port 8888 but is not reachable. Checked for open ports in the instance and the port 8888 was effectively open, and the app listening on such port but it didn’t through any response when sending get requests. This is the output when running npm run build --report
:
> trainset@1.0.0 build /home/ubuntu/trainset
> node build/build.js
⠏ building for production...Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
⠙ building for production...Webpack Bundle Analyzer is started at http://127.0.0.1:8888
Use Ctrl+C to close it
Hash: e9d1a797449fe90274d1
Version: webpack 4.44.1
Time: 18566ms
Built at: 02/13/2021 1:17:07 PM
Asset Size Chunks Chunk Names
app.e9d1a797449fe90274d1.css 178 KiB 0 [emitted] [immutable] app
index.html 718 bytes [emitted]
static/.gitkeep 0 bytes [emitted]
static/favicon.ico 16.6 KiB [emitted]
static/files/colorlist.csv 134 bytes [emitted]
static/files/sample_trainset.csv 242 KiB [emitted]
static/js/app.269d873e8b157dec6fc2.js 573 KiB 0 [emitted] [immutable] [big] app
static/trainset_logo.png 44 KiB [emitted]
Entrypoint app [big] = app.e9d1a797449fe90274d1.css static/js/app.269d873e8b157dec6fc2.js
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
static/js/app.269d873e8b157dec6fc2.js (573 KiB)
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
app (751 KiB)
app.e9d1a797449fe90274d1.css
static/js/app.269d873e8b157dec6fc2.js
WARNING in webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/
Build complete.
Tip: built files are meant to be served over an HTTP server.
Opening index.html over file:// won't work.
Running npm run dev
to test it on port 8080 doesn’t work. When I telnet to port 8080 it can establish the connection temporarily but it’s closed by the host immediately. This is the output when running npm run dev
:
DONE Compiled successfully in 6566ms 1:36:26 PM
I Your application is running here: http://localhost:8080
Output when running npm run start
:
root@ip-10-35-35-69:/home/ubuntu/trainset# npm run start
> trainset@1.0.0 start /home/ubuntu/trainset
> node server.js
Listening on port 5000
If I run a telnet on port 5000 I can reach it but when sending get requests to such port it’s not able to respond properly and this output is shown on the session where I’m running npm run start
:
Error: Can't set headers after they are sent.
at SendStream.headersAlreadySent (/home/ubuntu/trainset/node_modules/send/index.js:390:13)
at SendStream.send (/home/ubuntu/trainset/node_modules/send/index.js:617:10)
at onstat (/home/ubuntu/trainset/node_modules/send/index.js:729:10)
at FSReqWrap.oncomplete (fs.js:155:5)
Probably there are steps that I’m missing. I would like to understand what I’m doing wrong here and based on the outcome I can help building a more detailed documentation. Thanks in advance for your time.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
That might work. I’ll also try it out on macOS. Thanks again for you answer. Best regards.
the most extensively we have tested it is on MacOS running Chrome or Safari. The app runs entirely without access to the internet. The hosted version is just to get the app. You could load the page, then airgap your machine, do whatever you need to do (it will work fine), then close the page before reconnecting to the network. Would that work?