Hi,
I’m making an extension that would use a library that does interfaces -> JSON Schema transformation. The specific library is https://www.npmjs.com/package/ts-json-schema-generator, however I’m getting several errors regarding fs, assert and util. “Can’t resolve fs in /…” is the kind of error I get when running yarn.
I’m wondering what would be the solution for this. I’s it because I’m using the library in the frontend-module, or should I do the transformation somehow in the backend to utilize node libraries.
@loba thank you for the discussion, as you pointed out the frontend (browser) cannot use Node APIs directly, they can only be used in the backend (node).
For more information you can look at the code organization documentation which provides some additional details.
I used LocalizationContribution,then yarn,I get 'ERROR in …/node_modules/@theia/core/node_modules/fs-extra/lib/empty/index.js 4:11-24
Module not found: Error: Can’t resolve ‘fs’ ’ this error, I dont know how to fix it?