openapi-snippet
openapi-snippet copied to clipboard
ERROR in ./node_modules/form-data/lib/form_data.js Module not found: Error: Can't resolve 'fs'
Log:
ERROR in ./node_modules/form-data/lib/form_data.js
Module not found: Error: Can't resolve 'fs' in '/path/to/ptoject/node_modules/form-data/lib'
@ ./node_modules/form-data/lib/form_data.js 7:9-22
@ ./node_modules/openapi-snippet/node_modules/httpsnippet/src/index.js
@ ./node_modules/openapi-snippet/index.js
Explanation:
A recent change in the httpsnippet package - introduced in v1.23.0 - broke builds when using openapi-snippet
.
Workaround:
Force openapi-snippet
to use the 1.22.0 version. With yarn: https://classic.yarnpkg.com/en/docs/selective-version-resolutions/
Sorry about that, I've just submitted a fix in https://github.com/Kong/httpsnippet/pull/184.
@erunion nice to see this fixed. Is a patch planned to distribute the fix?
@ErikWittern I don't manage or use this project but a new release of HTTPSnippet was pushed out with my fix for this issue so it should be able to be pulled in here to resolve the problem.
@erunion Thanks for the information!
The original author of this issue, @truumahn, states that the issue was
introduced in v1.23.0
Given that this is still the latest released version as of now (see npm and GitHub), I will hold off with updating the dependency until the new version is released.
Sorry yeah you're right. My fix for this is in https://github.com/Kong/httpsnippet/commit/0fc7f4a42cafadf00d1f2c0463ac93f9a8e7258b which hasn't been released yet.