Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

While developing custom visuals for power bi, I am getting module not found error

Hi,

 

While creating custom visuals for power bi, I am getting module not found error. Even though the module is present in the library I am getting the module not found error. Below is the error message and screenshot.

 


node:internal/modules/cjs/loader:1048
const err = new Error(message);
^

Error: Cannot find module '.lib/Compilation'
Require stack:
- C:\Users\HameedShaik\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\node_modules\webpack\lib\SourceMapDevToolPlugin.js
- C:\Users\HameedShaik\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\node_modules\webpack\lib\index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
at Module._load (node:internal/modules/cjs/loader:901:27)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at Object.<anonymous> (C:\Users\HameedShaik\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\node_modules\webpack\lib\SourceMapDevToolPlugin.js:10:21)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\HameedShaik\\AppData\\Roaming\\npm\\node_modules\\powerbi-visuals-tools\\node_modules\\webpack\\lib\\SourceMapDevToolPlugin.js',
'C:\\Users\\HameedShaik\\AppData\\Roaming\\npm\\node_modules\\powerbi-visuals-tools\\node_modules\\webpack\\lib\\index.js'
]
}

Node.js v20.9.0

 

Hameed_0-1704881136924.png

 

Hameed_1-1704881244646.png

 

2 REPLIES 2
Anonymous
Not applicable

Hi, I followed the above steps but still I am facing the same issue

Anonymous
Not applicable

Hi @Anonymous ,

Thanks for reaching out to us with your problem. Base on your description, it seems like you're encountering a module not found error while developing custom visual in Power BI. This error occurs when the module is not correctly installed or cannot be located by the system. Please refer the methods in the following links and check if they can resolve your problem.

node.js - Cannot find module '../lib/completion' Inspite of installing Completion - Stack Overflow

I was unable to determine the cause of the issue. However, an uninstall then reinstall of gulp solved it.

Uninstall:

npm uninstall gulp --save
Re-install:

npm install gulp --save


How do I resolve "Cannot find module" error using Node.js? - Stack Overflow

Best Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.