Forum Discussion

pramodcog's avatar
pramodcog
Frequent Visitor
1 year ago

Issue with pbiviz package command not resolving third party modules correctly

Hello,

I am encountering an issue with the pbiviz package command while trying to package my Power BI custom visual. The command fails with module resolution errors, specifically for @mui & lodash modules used by internal library.

 

Here are the details:

Module not found: Error: Can't resolve '@mui/base/Button' in '/path/to/project/node_modules/internal_library'
Did you mean 'index.js'?
BREAKING CHANGE: The request '@mui/base/Button' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e.g., a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').

 

Same error for lodash as well

 

I am using webpack configuration to resolve alias for these libraries for local build which works fine (I run yarn build && yarn start).

 

I am wondering if there is a configuration in pbiviz.json or some other config I need to add similar to alias as webpack config to solve the issue?

 

I would appreciate any guidance or suggestions on how to resolve this issue. Thank you!

 

Best Regards,

Pramod

1 Reply

  • pramodcog's avatar
    pramodcog
    Frequent Visitor

    Hello,

     

    I would appreciate if any one can provide a positive response for the above post!

     

    Best Regards,

    Pramod