New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find module: 'isomorphic-form-data' in swagger-ui-react #7436
Comments
If I understand correctly, this seems to have been introduced by the dependency change in swagger-api/swagger-js#2154 |
any way to fixed it right now? |
You're absolutely right and thanks for reporting this. The problem is in swagger-ui-react build fragments. It contains build fragments that reference the isomorphic-form-data in lazy way. As every build on CI of swagger-ui-react will download latest version of swagger-client, which now doesn't require isomorphic-form-data and thus don't install it. We need to fix how we expose build fragments for swagger-ui-react so that this doesn't happen in future. On Thursday 29.7.2021 there will a new release of swagger-ui-react that will fix this issue automatically by updating to it. The workaround mentioned in this issue, must be implemented (adding isomorphic-form-data in package.json) before the new release of swagger-ui-react is available. Update: Problem can be solved as well by pinning swagger-client to a particular version before v3.14.0 in you package.json file and using webpack alias to use this pinned version. But that is a more complicated approach than just installing isomorphic-form-data. |
This sets minimum Node.js version to >=12.4 and fixes problem with swagger-ui.js build fragment. Refs #7436
Q&A (please complete the following information)
Describe the bug you're encountering
When running
npm run build
we ran into a problem withswagger-ui-react
package. The error occured inswagger-ui.js
- Cannot find module: 'isomorphic-form-data'. Make sure this package is installed.isomorphic-form-data
package is not in node_modules.Expected behavior
npm run build
runs without errors.Screenshots
Additional context or thoughts
When I install
isomorphic-form-data
package into my project, build works fine.The text was updated successfully, but these errors were encountered: