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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Hameed
Regular Visitor

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-1704873504402.png

 

 

1 REPLY 1
Paulhaha
Helper II
Helper II

Hey, 

 

When you start a pbiviz project you write the command "pbiviz new projectname"

Then, pbiviz creates a folder whose name is projectname

Be sure to be in the folder projectname with powershell to start the visualization project, otherwise pbiviz won't find the "package.json" file

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors