在Ubuntu上安装Bot Framework模拟器时出错

我无法在ubuntu 16.04上安装微软模拟器。

我从门户网站下载了BotFramework-Emulator-3.5.29.zip文件,然后将其解压并成功运行npm install (但得到以下消息):

 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@^1.0.1(node_modules/7zip-bin/node_modules/7zip-bin-mac): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-mac@1.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-win@^2.1.0 (node_modules/7zip-bin/node_modules/7zip-bin-win): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-win@2.1.0: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"x64"}) 

然后gulp build-app会引发以下错误:

 [14:32:40] Using gulpfile /var/www/BotFramework-Emulator-3.5.29/gulpfile.js [14:32:40] Starting 'clean'... [14:32:40] Finished 'clean' after 23 ms [14:32:40] Starting 'build-app'... [14:32:40] Compiling TypeScript files using tsc version 2.1.5 [14:32:46] [tsc] > node_modules/botframework-directlinejs/built/directLine.d.ts(204,13): error TS2304: Cannot find name 'object'. [14:32:46] Failed to compile TypeScript: Error: tsc command has exited with code:1 events.js:160 throw er; // Unhandled 'error' event ^ Error: Failed to compile: tsc command has exited with code:1 

也许有一件奇怪的事情:在package.json有一个依赖"typescript": "2.2.2" ,但是在你的日志中它说Compiling TypeScript files using tsc version 2.1.5 。 没有TypeScript版本的问题吗?

你可以尝试更新Typescript到2.2并再次运行一切?

看来,你的错误error TS2304: Cannot find name 'object'. 是由于在TS2.2中object是关键字这个事实(例如参见这个答复,说明一样)

在package.json中添加最新的依赖项,可能是在开发之后更改了一些依赖项版本我更改了package.json中的所有版本

 "dependencies": { "gulp-debug": "2.1.2", "gulp-filter": "4.0.0", "gulp-flatmap": "1.0.0", "gulp-inject": "4.2.0", "gulp-rename": "1.2.2", "gulp-tsc": "1.2.6", "gulp-util": "3.0.8", "license-list": "0.1.3", "object-assign": "4.1.0", "tslib": "1.5.0", "typescript": "2.2.2", "vinyl": "2.0.1", "vinyl-fs": "2.4.4" }, 

然后重新build立一个应用程序

 build gulp-app 

然后运行该项目

 npm start 

这解决了我所有的问题和所有的工作顺利