1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Getting node related errors when using pptxgenjs latest version in NX Angular Microfrontend...

Discussão em 'Angular' iniciado por Pranav Kale, Setembro 10, 2025.

  1. Pranav Kale

    Pranav Kale Guest

    I am using NX Angular microfrontend application. @nx/angular: 20.8.0, Angular: 19.28

    I am trying to pptxgenjs: 4.0.1 in my application. During build I am getting following error:

    node:fs - Error: Module build failed: UnhandledSchemeError: Reading from "node:fs" is not handled by plugins (Unhandled scheme).
    Webpack supports "data:" and "file:" URIs by default.
    You may need an additional plugin to handle "node:" URIs.

    node:https - Error: Module build failed: UnhandledSchemeError: Reading from "node:https" is not handled by plugins (Unhandled scheme).
    Webpack supports "data:" and "file:" URIs by default.
    You may need an additional plugin to handle "node:" URIs.

    Error: Can't resolve 'node-modules/pptxgenjs/dist/pptxgen.bundle.js' in 'C:\Codebase\ui-ppt'


    Everything works fine when I use pptxgenjs: 3.11.0. I can see from there documentation that support for node was added in version 4.0.0 and above.

    I tried adding following code to my webpack.config:

    export default withModuleFederation(config, {
    resolve: {
    fallback: {
    fs: false,
    path: false,
    os: false
    }
    }
    } as NxModuleFederationConfigOverride);


    But this is not working.

    Continue reading...

Compartilhe esta Página