我一直在用我所做的最新的pbiviz东西更新我的开发环境:
npm i -g powerbi可视化工具
以及:
pbiviz安装证书
在Windows终端/powershell中
然后,我在Visual中打开了一个项目,并使用终端做了一个:
pbiviz包信息构建视觉..。信息安装API:~3.8.0.
证书无效!未找到“警告本地有效证书”。检查pbiviz证书的全局实例的信息。
警告未找到有效pbiviz证书的全局实例。生成新证书的信息..。生成信息证书。位置是C:\Users\mike\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\certs\PowerBICustomVisualTest_public.pfx.密码是'4492518445773821‘信息开始准备插件模板信息完成准备插件模板错误错误:0308010C:数字信封例程::不支持的C:\Users\mike\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\node_modules\powerbi-visuals-webpack-plugin\index.js:185抛出新错误(“未能生成visualPlugin.ts");
错误:在异步C:\Users\mike\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\node_modules\powerbi-visuals-webpack-plugin\index.js:185:12 PowerBICustomVisualsWebpackPlugin._beforeCompile (C:\Users\mike\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\node_modules\powerbi-visuals-webpack-plugin\index.js:177:4)处生成visualPlugin.ts失败
Node.js v17.0.0
我试过卸载,修复和各种咒语,但它不想去。
我的证书真的无效吗?我该怎么查?有什么我能做的诊断吗?任何和所有的建议都欣然接受。
我刚刚更新到pbiviz -V 3.4.1相同的问题
发布于 2021-10-28 00:01:00
调试会话之后,我们在powerbi-visuals-tools@3.4.1中发现了一个错误,其中certificatetoosl.js中的证书检查使用证书到期日期的文本日期,在我的示例中是dd/mm/yyyy,它失败了,因为这是预期和ISO 8601,但是将与mm/dd/yyyy一起工作--这是代码:
// For Windows OS:
if (os.platform() === "win32") {
if (!fs.existsSync(pfxPath) || !passphrase) {
return false;
}
let certStr = await exec(`certutil -p ${passphrase} -dump "${pfxPath}"`);
let certStrSplitted = certStr.split('\r\n');
let regex = /(?<=: ).*/;
endDateStr = regex.exec(certStrSplitted[6]);
}
// For Linux and Mac/darwin OS:
else if (os.platform() === "linux" || os.platform() === "darwin") {
if (!fs.existsSync(certPath)) {
return false;
}
endDateStr = await exec(`openssl x509 -enddate -noout -in ${certPath} | cut -d = -f 2`);
}
let endDate = new Date(Date.parse(endDateStr));
verifyCertDate = (endDate - new Date()) > certSafePeriod;
if (verifyCertDate) {
ConsoleWriter.info(`Certificate is valid.`);
} else {
ConsoleWriter.warn(`Certificate is invalid!`);
removeCertFiles(certPath, keyPath, pfxPath);
}我们没有一个完整的解决方案,但会有解决办法,直到包是固定的。删除所有模块并重新安装似乎也解决了visualPlugin.ts问题。1:https://i.stack.imgur.com/XVrsQ.png
https://stackoverflow.com/questions/69656410
复制相似问题