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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
saviourofdp
Advocate I
Advocate I

How Do I Compile powerbiclient Jupyter Widget

I'm trying to contribute to powerbi-jupyter , following the Contribution Guidelines. After cloning the project, I'm failing at the first hurdle with the following command, which just runs tsc

 

npm run build:lib


The version of tsc used is 4.3.5. The errors I am getting are

powerbi-jupyter-1>npm run build:lib

> powerbi-jupyter-client@3.1.1 build:lib
> tsc

node_modules/@jupyterlab/services/lib/tokens.d.ts:3:15 - error TS1005: ',' expected.

3 import { type IPlugin, Token } from '@lumino/coreutils'; ~~~~~~~

node_modules/@rjsf/utils/lib/getDateElementProps.d.ts:1:15 - error TS1005: ',' expected.

1 import { type DateObject } from './types.js'; ~~~~~~~~~~

node_modules/@rjsf/utils/lib/index.d.ts:17:36 - error TS1005: ',' expected.

17 import getDateElementProps, { type DateElementFormat } from './getDateElementProps.js';
~~~~~~~~~~~~~~~~~

node_modules/@types/lodash/common/common.d.ts:262:65 - error TS1005: '?' expected.

262 type StringToNumber = T extends `${infer N extends number}` ? N : never; ~

node_modules/@types/lodash/common/object.d.ts:1026:46 - error TS1005: '?' expected.

1026 : K extends `${infer N extends number}` ? T[N] ~

node_modules/@types/lodash/common/object.d.ts:1031:46 - error TS1005: '?' expected.

1031 : K extends `${infer N extends number}` ? T[N] ~

node_modules/@types/lodash/common/object.d.ts:1041:46 - error TS1005: '?' expected.

1041 : K extends `${infer N extends number}` ~

Found 7 errors.

 

How do I get this to work?

1 ACCEPTED SOLUTION
johnbasha33
Super User
Super User

@saviourofdp 

Install a local TypeScript version (don't rely on global tsc)

In the project directory (inside powerbi-jupyter-1/😞
npm install typescript@latest --save-dev

Check that the correct tsc is used when running scripts

When you run npm run build:lib, npm will automatically use the local node_modules/.bin/tsc, NOT your globally installed old one — as long as local one exists.

You can double-check by running:
npx tsc --version

Re-run the build

Now try:
npm run build:lib


Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!





View solution in original post

3 REPLIES 3
v-menakakota
Community Support
Community Support

Hi @saviourofdp ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

johnbasha33
Super User
Super User

@saviourofdp 

Install a local TypeScript version (don't rely on global tsc)

In the project directory (inside powerbi-jupyter-1/😞
npm install typescript@latest --save-dev

Check that the correct tsc is used when running scripts

When you run npm run build:lib, npm will automatically use the local node_modules/.bin/tsc, NOT your globally installed old one — as long as local one exists.

You can double-check by running:
npx tsc --version

Re-run the build

Now try:
npm run build:lib


Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!





Ok thanks - this seems to have worked. I don't understand why it wouldn't work with the version of tsc that the author used to originally create the project, but hey thanks again.

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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

Top Solution Authors