使用 yo Office 运行 Excel 任务窗格项目后收到“office-addin-debugging 未被识别为内部或外部命令”

Ola*_*kan 7 excel excel-addins office-js

office-js由于显然缺少“office-addin-debugging”,我无法启动Excel 任务窗格加载项项目。但是,我注意到该模块包含在我的开发依赖项中。我按照官方网站上的示例教程进行操作。错误消息可以在下面看到

'office-addin-debugging' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! office-addin-taskpane-js@0.0.1 start:web: `office-addin-debugging start manifest.xml web`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the office-addin-taskpane-js@0.0.1 start:web script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Run Code Online (Sandbox Code Playgroud)

小智 11

我遇到过同样的问题。由于某种原因,运行npm install并未安装所有依赖项,但单独安装缺少的脚本是有效的。

npm install office-addin-debugging手动运行并且成功了。


Mav*_*tes 2

我认为你指的是这个包的安装:

https://www.npmjs.com/package/office-addin-debugging

从网站上的文档:

句法:

Office addin-调试启动[选项]

清单:清单文件的路径。

看起来你正在运行命令

office-addin-debugging manifest.xml
Run Code Online (Sandbox Code Playgroud)

但真正的命令是

office addin-debugging start manifest.xml
Run Code Online (Sandbox Code Playgroud)