我无法在ubuntu 16.04上安装microsoft模拟器。
我从门户网站下载了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
答案 0 :(得分:2)
也许有一件奇怪的事:在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'.
似乎是因为object
是TS2.2中的关键字(例如,请参阅此reply说明相同的内容)
答案 1 :(得分:0)
在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"
},
然后重建gulp app
build gulp-app
然后用
运行项目npm start
这解决了我所有问题并且一切顺利