-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
Module not found: Error: Cannot resolve module 'fs' #27
Comments
It looks like you're using webpack, and something in your config is causing it to load the Node.js version of JSON Schema Ref Parser rather than the browser version. |
I had the same problem. Solved it by adding the alias in webpack so it knows where to find the correct asset.
and you use it as you would normally but use the alias key
|
Closing this issue, since it's a WebPack config issue. Thanks to @mari0juric for posting a solution, which will help others who are facing this problem. 👍 |
Adding the "browser" field to package.json. For details, see: https://github.com/defunctzombie/package-browser-field-spec Useful when one is not using bower to install this package. Atleast webpack seems to pick this up without issue. Webpack seems to support it - seems like an elegant solution for mixed usage libraries. Seems to be a better solution than APIDevTools#27 APIDevTools#27
FYI: the latest package on npm doesn’t have the Probably bumping the version and re-releasing the package could fix the problem? Or is the field removed during the publish routine ( |
Ah, yeah, it’s not published because the latest release was before #30 was merged. Is there a chance that these changes will be published? |
I just released v3.2.0, which includes the |
Thank you! |
I am using the babel generator boilerplate for a library I am building. I added this library and imported it into my project. Now when I run gulp build I get the following error. Any assistance would be highly appreciated.
The text was updated successfully, but these errors were encountered: