You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When fast-form-generator-react is put through a production build using the default setup of create-react-app there appears to be an error when uglification scopes functions. This results in a ref error due to a value being undefined (or so it thinks). Below is the error although it's pretty useless.
ReferenceError: s is not defined
at t.t (form-section.utilities.js:226)
at new (form-section.js:62)
at Ni (react-dom.production.min.js:174)
at ha (react-dom.production.min.js:202)
at ma (react-dom.production.min.js:203)
at $a (react-dom.production.min.js:212)
at qa (react-dom.production.min.js:211)
at Ga (react-dom.production.min.js:211)
at rs (react-dom.production.min.js:223)
at Nn (react-dom.production.min.js:89)
zi @ react-dom.production.min.js:188
n.callback @ react-dom.production.min.js:195
Ko @ react-dom.production.min.js:144
Go @ react-dom.production.min.js:145
Xa @ react-dom.production.min.js:220
$a @ react-dom.production.min.js:212
qa @ react-dom.production.min.js:211
Ga @ react-dom.production.min.js:211
rs @ react-dom.production.min.js:223
Nn @ react-dom.production.min.js:89
form-section.utilities.js:226 Uncaught ReferenceError: s is not defined
at t.t (form-section.utilities.js:226)
at new (form-section.js:62)
at Ni (react-dom.production.min.js:174)
at ha (react-dom.production.min.js:202)
at ma (react-dom.production.min.js:203)
at $a (react-dom.production.min.js:212)
at qa (react-dom.production.min.js:211)
at Ga (react-dom.production.min.js:211)
at rs (react-dom.production.min.js:223)
at Nn (react-dom.production.min.js:89)
To Reproduce
Steps to reproduce the behavior:
Create an app using create-react-app (i used the typescript version)
Include a Form in your app
Ensure that your schema has oneOf or anyOf defined
Run a production build
Run your app and you should see it puke
Expected behavior
Prod build works with create-react-app
I could fix this by ejecting create-react-app and making changes to my webpack.config.js (namely ensuring that sourceMap: true instead of shouldUseSourceMap) but I think create-react-app is common enough that this package should support it out of the box. Not to mention this is a tricky issue to debug.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug
When fast-form-generator-react is put through a production build using the default setup of create-react-app there appears to be an error when uglification scopes functions. This results in a ref error due to a value being undefined (or so it thinks). Below is the error although it's pretty useless.
ReferenceError: s is not defined
at t.t (form-section.utilities.js:226)
at new (form-section.js:62)
at Ni (react-dom.production.min.js:174)
at ha (react-dom.production.min.js:202)
at ma (react-dom.production.min.js:203)
at $a (react-dom.production.min.js:212)
at qa (react-dom.production.min.js:211)
at Ga (react-dom.production.min.js:211)
at rs (react-dom.production.min.js:223)
at Nn (react-dom.production.min.js:89)
zi @ react-dom.production.min.js:188
n.callback @ react-dom.production.min.js:195
Ko @ react-dom.production.min.js:144
Go @ react-dom.production.min.js:145
Xa @ react-dom.production.min.js:220
$a @ react-dom.production.min.js:212
qa @ react-dom.production.min.js:211
Ga @ react-dom.production.min.js:211
rs @ react-dom.production.min.js:223
Nn @ react-dom.production.min.js:89
form-section.utilities.js:226 Uncaught ReferenceError: s is not defined
at t.t (form-section.utilities.js:226)
at new (form-section.js:62)
at Ni (react-dom.production.min.js:174)
at ha (react-dom.production.min.js:202)
at ma (react-dom.production.min.js:203)
at $a (react-dom.production.min.js:212)
at qa (react-dom.production.min.js:211)
at Ga (react-dom.production.min.js:211)
at rs (react-dom.production.min.js:223)
at Nn (react-dom.production.min.js:89)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Prod build works with create-react-app
Additional context
Here are some threads around a similar issue that another package ran into
mapbox/mapbox-gl-js#4359 (comment)
mapbox/mapbox-gl-js#6956
The text was updated successfully, but these errors were encountered: