Office js OfficeJS在调试模式下出错,仅适用于桌面版本

Office js OfficeJS在调试模式下出错,仅适用于桌面版本,office-js,Office Js,在尝试运行桌面版本时,我突然发现工作代码中的错误。同样适用于在线版本,如运行npm run Dev Server 甚至尝试在不同的端口5003 > Executing task: npm run start:desktop < > excel-custom-functions@2.0.0 start:desktop C:\Users\user\Desktop\BatchingReCalculate\Batching > office-addin-debugging

在尝试运行桌面版本时,我突然发现工作代码中的错误。同样适用于在线版本,如运行npm run Dev Server

甚至尝试在不同的端口5003

> Executing task: npm run start:desktop <    
> excel-custom-functions@2.0.0 start:desktop C:\Users\user\Desktop\BatchingReCalculate\Batching
> office-addin-debugging start manifest.xml deskto`enter code here`p
Debugging is being started...
App type: desktop
Enabled debugging for add-in e504fb41-a92a-4526-b101-542f357b7acb. Debug method: 0
Starting the dev server... (webpack-dev-server --mode development --config webpack.config.js)
Unable to start the dev server. Error: The dev server is not running on port 3000.
Sideloading the Office Add-in...
Unable to sideload the Office Add-in. Error: Command failed: office-toolbox sideload -m manifest.xml -a excel
ApplicationInsights:CorrelationIdManager [
  Error: connect ECONNREFUSED xx.xx.xx.xxx:xxx
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1129:14) {
    errno: 'ECONNREFUSED',
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: 'xx.xx.xx.xxx',
    port: xxx
  }
]
>执行任务:npm运行开始:桌面<
>卓越定制-functions@2.0.0开始:桌面C:\Users\user\desktop\Batching重新计算\Batching
>office加载项调试启动manifest.xml deskto`在此处输入代码`p
正在启动调试。。。
应用程序类型:桌面
已启用外接程序e504fb41-a92a-4526-b101-542f357b7acb的调试。调试方法:0
正在启动开发服务器。。。(webpack开发服务器--模式开发--config webpack.config.js)
无法启动开发服务器。错误:dev服务器未在端口3000上运行。
侧向加载Office加载项。。。
无法侧向加载Office加载项。错误:命令失败:office工具箱侧加载-m manifest.xml-a excel
ApplicationInsights:CorrelationIdManager[
错误:连接EConrefusexx.xx.xx.xxx:xxx
在TCPConnectWrap.afterConnect[as oncomplete](net.js:1129:14){
错误号:'econnrefered',
代码:'econnreference',
系统调用:“连接”,
地址:“xx.xx.xx.xxx”,
港口:xxx
}
]

看起来您需要在运行
npm run Dev Server
之前终止端口3000,以终止任务'1.netstat-ano | findstr:3000 2.taskkill/PID 4164/F'。1.从第一个命令中获取PID,并将其放在第二个命令中。我想是的。因为我通常使用您提到的“端口已在使用”场景中的步骤。嗨,团队,有更新吗?即使我尝试运行不同的端口5003,仍然存在相同的问题。