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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
aaronchen
Regular Visitor

How to run the code in PowerBI-JavaScript GitHub?

Hi,

I'm not familar with javascript build tool. 

How to run the code in here: https://github.com/Microsoft/PowerBI-JavaScript

I tried npm run build, npm start, not working.

I guess it's use different build tool.

 

Thanks

Aaron

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi Aaron,

 

1. You need a web server to get this website work. The IIS is recommended.

2. Install all the css and js packages. Please refer to PowerBI-JavaScript. (We need to install other packages other than "powerbi-client".

npm install --save powerbi-client
npm install --save bootstrap

3. It looks like this finally.

 

How to run the code in PowerBI-JavaScript GitHub.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

I have a similar question, I installed the nuget package Microsoft.PowerBI.JavaScript 2.10.2.

 

In my view, I have the following line:

<head>

<script type="text/javascript" src="scripts/powerbi.js"></script>

</head>

 

I realize that this is referencing a local copy of this script that I have to put in the scripts folder.  This works fine, even without installing the package mentioned above.

 

My question is, how do I get my view to reference the powerbi.js that comes with the nuget package Microsoft.PowerBI.JavaScript 2.10.2?  Or am I not understanding how this is supposed to work?

 

 

 

 

v-jiascu-msft
Employee
Employee

Hi @aaronchen,

 

Did you make it?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Employee
Employee

Hi Aaron,

 

1. You need a web server to get this website work. The IIS is recommended.

2. Install all the css and js packages. Please refer to PowerBI-JavaScript. (We need to install other packages other than "powerbi-client".

npm install --save powerbi-client
npm install --save bootstrap

3. It looks like this finally.

 

How to run the code in PowerBI-JavaScript GitHub.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.