Closed NoPhaseNoKill closed 4 years ago
Some further investigation done via this PR. https://github.com/NoPhaseNoKill/dota-stats-ui/pull/21
Still no clear answer/solution to this problem
Closing issue. Was found to be that a plugin I was using in the babel config was incompatible with newer versions of node. Made travis.yml config have node 10, and problem solved. Thanks @dawnmist
Finally found the issue - feel free to read through the PR for where we were testing things.
In this case, the issue turned out to be that babel-plugin-styled-components-css-namespace
was incompatible with node.js versions later than 12.10, which caused the tests to hang when trying to create styled components with that plugin active.
Issue: Running 'yarn react-app-rewired' is hanging (not finishing) when running inside of a TravisCI container (docker). It seems to run indefinitely, indicating there's an unreturned promise. These tests run fine locally.
Note: I have tested inside of container, and confirmed that if I go back to using 'react-script test' the tests run as expected. Whether or not I need some additional config, or it's a legit bug I cannot determine. The script never seems to finish. The issue seems to be caused by the following piece of code found inside of test.js:
require(paths.scriptVersion + '/scripts/test');
When I comment this line out, the process is able to get to the end. Hence, the suspecting of a promise being unreturned/random error being thrown somewhere down the chain.
I would like to be using all of the babel config, considering the reason I've brought this in is for a CSS styling issue with Styled Components. This would affect tests being run, and specificity of the styles being applied during compilation.
Could you please advise on what I need to do?
To reproduce: 1) Add react-app-rewired to CRA. 2) Configure TravisCI for github project to run one of the scripts in package.json (seen below as react-app-rewired test) 3) Commit to said project - this will trigger a TravisCI build 4) Will hang on instantiation of test runs.
Example of failing build - these tests should take approx 5 seconds to complete (there's only 2 of them). It times out after 10 minutes: https://travis-ci.com/NoPhaseNoKill/dota-stats-ui/builds/152316923 Example project: https://github.com/NoPhaseNoKill/dota-stats-ui
package.json
config-overrides.js:
.babelrc:
'config' variable found inside of test.js returns the following if it helps:
edit: some slight formatting