Metadata
- Source
- FLUID-6527
- Type
- Bug
- Priority
- Major
- Status
- Closed
- Resolution
- Migrated
- Assignee
- Gregor Moss
- Reporter
- Giovanni Tirloni
- Created
2020-07-09T02:53:31.995-0400 - Updated
2024-07-19T07:38:46.209-0400 - Versions
- N/A
- Fixed Versions
- N/A
- Component
- N/A
Description
The dynamic routes used in the menu only work when running through the webpack-dev-server.
After running
npm run build
, the contents of the public folder do not have directories like /htp1, /level1, level2, etc (so they generate 404 errors when deployed to a production webserver).
It's as if the react-router-dom component is not working as expected for some reason. Tested with Chrome 83.
When it works:
npm install
npm run start
open http://localhost:8888
When it fails:
npm install
npm run build
python -m http.server --directory public
open http://localhost:8888 -> click menu options
It seems that @@Alan Harnum had some problems creating a deployable unit in INFRA-217 as well.
Additionally, the UglifyJsPlugin from webpack 3.10.0 causes a build error. It's necessary to remove it from webpack.production.config.js to get a clean build (which still has the issue with the routes).
Comments
-
Gregor Moss commented
2020-07-14T03:09:23.526-0400 Once I'd removed the UglifyJsPlugin step from the webpack script, I was able to get the site built and running mostly properly by running server.js via the following actions:
npm install npm run serve:build open http://localhost:8080
OR
npm install npm run build node .\server.js open http://localhost:8080
I say "mostly properly" because almost none of the audio works any more, as all but one file were hosted on and imported from instaud.io. Only the "game over" sound is actually present in the repository, somewhat fittingly.
For context, my environment is:
- Windows 10 Pro v1909
- Chrome 83
- Node v10.15.3
- npm 6.4.1
-
Giovanni Tirloni commented
2020-07-14T07:56:13.059-0400 Should we consider this a dynamic website then with a live component (the express server)? I was hoping to just serve the contents of the public folder but it doesn't seem possible.
-
Justin Obara commented
2024-07-19T07:38:46.033-0400 Migrated to https://github.com/fluid-lab/Spifind/issues/1