Set up your environment for developing a Power BI visual
This article teaches you how to set up your environment for developing a Power BI visual.
Before you start development, you need to install node.js and the pbiviz package. Then, when your local environment is set up, you need to configure Power BI service for developing a Power BI visual.
In this article, you learn how to:
Prerequisites
Before you start developing your Power BI visual, verify that you have everything listed in this section.
- A Power BI Pro or Premium Per User (PPU) account. If you don't have one, sign up for a free trial.
- An integrated development environment (IDE) for developing JavaScript and TypeScript applications. Visual Studio Code (VS Code) is ideal for developing visuals.
- Windows PowerShell version 4 or later (for Windows). Or Terminal (for Mac).
Install node.js
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It allows developers to run any apps created on JavaScript.
To install node.js:
Navigate to node.js, from your web browser.
Download the latest recommended MSI installer.
Run the installer, and then follow the installation steps. Accept the terms of the license agreement and all defaults.
Restart your computer.
Install pbiviz
The pbiviz tool, which is written using JavaScript, compiles the visual source code of the pbiviz package.
The pbiviz package is a zipped Power BI visual project, with all the needed scripts and assets.
To install the latest version of pbiviz, open Windows PowerShell and enter the following command.
npm i -g powerbi-visuals-tools@latest
Note
You might get some warnings when you run this command. They should not prevent pbiviz from installing.
(Optional) Verify that your environment is set up
Confirm that the Power BI visuals tools package is installed. In PowerShell, run the command pbiviz
and review the output, including the list of supported commands.
Enable developer mode
To develop or upload your own Power BI visual in the Desktop or on the web, developer mode must be enabled.
To develop a Power BI visual in the Desktop, enable the Develop a visual setting. This setting only stays enabled for the current session. You must enable this setting in each session where you import a visual from a file.
- From the Power BI desktop, navigate to File > Options and settings > Options
- Select Report settings in the Current file section, and enable the Develop a visual check box.
- Select OK