[英]Creating bot using Yeomen botbuilder
Iam creating a bot using Yeomen botbuilder generator.我正在使用 Yeomen botbuilder 生成器创建一个机器人。 I successfully installed botbuilder using
我使用成功安装了 botbuilder
npm install -g yo generator-botbuilder
then configured bot and when I try to run bot using npm start
or node index.js
Error is coming like this.然后配置 bot,当我尝试使用
npm start
或node index.js
运行 bot 时,错误是这样的。
C:\Users\Anant\Documents\Bots\anant>node index.js
C:\Users\Anant\Documents\Bots\anant\node_modules\restify\lib\request.js:848
Request.prototype.closed = function closed() {
^
TypeError: Cannot set property closed of #<Readable> which has only a getter
at patch (C:\Users\Anant\Documents\Bots\anant\node_modules\restify\lib\request.js:848:30)
at Object.<anonymous> (C:\Users\Anant\Documents\Bots\anant\node_modules\restify\lib\server.js:33:1)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Module.require (node:internal/modules/cjs/loader:1061:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (C:\Users\Anant\Documents\Bots\anant\node_modules\restify\lib\index.js:10:14)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
Node.js v18.12.1
I tried to update all packages.我试图更新所有包。 Tried to install windows-build-tools again, But its coming that its depreciated and included in node only.
试图再次安装 windows-build-tools,但它的贬值并仅包含在节点中。
This is due to an incompatibility between restify versions prior to v10.0.0
and Node v18.x
.这是由于 v10.0.0 之前的
v10.0.0
版本与 Node v18.x
之间的不兼容。 I've opened a pull request to update the botbuilder yo templates, but you can fix this issue by updating restify in your project to v10.0.0
.我已经打开了更新 botbuilder yo 模板的拉取请求,但您可以通过将项目中的
v10.0.0
更新为 v10.0.0 来解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.