以下是win7环境下踩的坑
1. win7自带的PowerShell版本是2.0,需要升级到最新版本
Download Windows Management Framework 5.1 from Official Microsoft Download Center
2. 执行pbiviz --install-cert 各种报错,需要手动创建证书
- win7环境中需要自行下载openssl,可百度自行解决或参考以下链接(注意安装完成后不要忘记配置环境变量)
- 手动创建证书,参考以下链接
为 Power BI 视觉对象创建 SSL 证书 - Power BI | Microsoft Docs
openssl req -x509 -newkey rsa:4096 -keyout PowerBIVisualTest_private.key -out PowerBIVisualTest_public.crt -days 365
- 证书会在PowerShell的当前目录生成,共2个文件,一个key文件一个crt文件, 把这两个文件复制到\powerbi-visuals-tools\certs中
- 导入证书
右击crt文件,选择安装即可,注意安装过程中选择受信任的根证书颁发机构
- powerbi-visuals-tools中config.json的配置更改
3. pbiviz的项目创建与运行,参考官方用例运行后发现https://localhost:8080/assets/status不通。
- pbiviz start后,是否会显示以下字样,运行成功后不要关闭界面
webpack 5.51.1 compiled successfully in 3545 ms
i 「wdm」: Compiled successfully.
- 检查本机的8080端口是否被占用