Sonos 模拟器无法编译节点包

Sonos Simulator not able to compile node package

正在尝试安装和使用 https://developer.sonos.com/tools/developer-tools/sonos-simulator/

当按照安装说明尝试通过目录中的 npm install 命令安装节点包时,尝试查找 node-ssdp 时出现 404 错误,如下面的代码片段所示:

P:\sonosDevel\sonos-simulator-0.4.34>npm install
npm notice
npm notice New minor version of npm available! 7.5.1 -> 7.6.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.6.3
npm notice Run npm install -g npm@7.6.3 to update!
npm notice
npm ERR! code E404
npm ERR! 404 Not Found - GET https://github.com/sonos/node-ssdp/archive/master.tar.gz
npm ERR! 404
npm ERR! 404  'node-ssdp@https://github.com/sonos/node-ssdp/archive/master.tar.gz' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\duart\AppData\Local\npm-cache\_logs21-03-18T21_59_44_515Z-debug.log

我怀疑除了希望 sonos 开发人员重新上传软件包并可能更新 Sonos Simulator 之外还有很多事情要做,但我不妨把它扔在这里看看是否有人有解决方案来获得 Simulator 运行 或者可能是其他一些解决方案来模拟网络上的 Sonos 设备,而无需实际拥有 Sonos 设备。

我今天在玩这个,并设法让它工作。

我安装了一个旧的 (4.x) 版本的节点,因为这是文档所说的它可以使用的版本(老实说,我没有尝试任何更新的东西,因为我无法让模拟器做我想做的事情想要所以之后卸载它)。

主要问题出在 node-ssdp 上,因为模拟器包含的包文件试图从不再存在的存储库中获取它。经过一些尝试和错误,我发现如果你编辑包文件指定node-ssdp 2.7.0(这是模拟器时发布的版本),npm install应该可以通过。 (如果您安装较新的版本,模拟器会在您 运行 几秒后崩溃)。

希望这对您有所帮助!