尝试Excel插件教程(https://docs.microsoft.com/en-us/office/dev/add-ins/quickstarts/excel-quickstart-jquery?tabs=yeomangenerator)时,运行npm start时出现错误:
> office-addin-taskpane-js@0.0.1 start D:\sheet_organizer
> office-addin-debugging start manifest.xml
Debugging is being started...
App type: desktop
Enabled debugging for add-in sheet_organizer. Debug method: 0
Starting the dev server... (webpack-dev-server --mode development)
The dev server is running on port 3000. Process id: 8456
Sideloading the Office Add-in...
Error: Unable to start debugging.
Error: Unable to sideload the Office Add-in.
Error: Unable to delete registry value "D:\sheet_organizer\manifest.xml" in key "HKCU\SOFTWARE\Microsoft\Office\16.0\Wef\Developer".
ProcessUncleanExitError: DELETE command exited with code 1:
Error: can't find the key or the value
我手动检查密钥。有一个Developper> 05c2e1c9-3e1d-406e-9a91-e9ac64854143文件夹
使用UseDirectDebugger,UseLiveReload和UseWebDebugger
因此密钥存在。不明白为什么它不起作用。
答案 0 :(得分:1)
是的,此问题已解决。 OfficeDev / Office-Addin-Scripts#215
请获取最新版本的office-addin-debugging。
有两种方法可以做到这一点。
1- npm update --dev可以根据semver更新所有软件包。 (您可以使用npm outdated --long查看过时的软件包。)
2-您可以使用npm install -D office-addin-debugging更新office-addin-debugging软件包。
参考:https://github.com/OfficeDev/office-js-docs-pr/issues/1321