-
Notifications
You must be signed in to change notification settings - Fork 20
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
ERROR in ./node_modules/contentful-sdk-core/dist/es-modules/get-user-agent.js #58
Comments
Okay, thank you. I will create the issue on the Angular CLI repository because I don't have direct access to the Webpack config. |
Argh damn, yeah this is nasty :/ Good luck! |
Hello @axe312ger, The Angular CLI team believes that libraries that are meant to run inside the browser are not supposed to use Node API. I am afraid that they are not willing to provide to override that Webpack config. Do you plan to add a version of your library that doesn't use those APIs ? Thanks, |
Alright, we will have a look how to avoid importing these node core modules on top level. |
Thank you very much. |
I have ran into the same problem, this time using rollup in a svelte/sapper app.
rollup offers different plugins to resolve the issue, one of them is Just wanted to say this is not a Webpack problem .. |
@OliverAssad What was your solve here? |
@eatarandom and @ahasall importing the browser module directly appears to work: import {createClient} from 'contentful/dist/contentful.browser'; |
@larrybotha thanks for that - works for now. |
We addressed this issue with this [PR](#198 which got released in version v6.8.5. |
Hello,
I installed the latest Contentful SDK.
When I build my application I have the following error:
ERROR in ./node_modules/contentful-sdk-core/dist/es-modules/get-user-agent.js
When I check the source code of get-user-agent.js if find this:
Knowing that I build for the web, and that the 'os' module if for Node.js apps, I suppose that this import is the reason for the error.
Do you have any idea about this issue ?
Thanks
The text was updated successfully, but these errors were encountered: