Theia学习笔记(四)
离奇的事情发生了,昨天还可以运行plugin,但是今天不行了,我昨天确实做了一些修改,就是一些关于依赖的修改,但是记不清是哪个依赖进行了修改。
学长留下的theia框架基于node 11.15.0 但是新版本的theia都是基于node12.14.0及更新版本的,所以版本问题也存在。
今天运行报错记录一下:
root ERROR Failed to start the backend application.
# 没能启动的了后端,没啥用
root ERROR TypeError [ERR_INVALID_ARG_VALUE]: The argument 'options' must have the property "port" or "path". Received [ 3000, 3030 ]
# 类型错误,参数缺少端口和路径,3000和3030接受,
# 这里的options不知道是已有配置好的webide还是指目标插件,我觉得应该是目标插件
at Server.listen (net.js:1432:11)
at BackendApplication.<anonymous> (/Users/lannisite/WebstormProjects/webide/node_modules/@theia/core/lib/node/backend-application.js:273:32)
at step (/Users/lannisite/WebstormProjects/webide/node_modules/@theia/core/lib/node/backend-application.js:59:23)
at Object.next (/Users/lannisite/WebstormProjects/webide/node_modules/@theia/core/lib/node/backend-application.js:40:53)
at /Users/lannisite/WebstormProjects/webide/node_modules/@theia/core/lib/node/backend-application.js:34:71
at new Promise (<anonymous>)
at __awaiter (/Users/lannisite/WebstormProjects/webide/node_modules/@theia/core/lib/node/backend-application.js:30:12)
at BackendApplication.start (/Users/lannisite/WebstormProjects/webide/node_modules/@theia/core/lib/node/backend-application.js:217:16)
at /Users/lannisite/WebstormProjects/webide/browser-app/src-gen/backend/server.js:32:28
at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:52:5)
root ERROR Uncaught Exception: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'options' must have the property "port" or "path". Received [ 3000, 3030 ]
# 同样的错误又抛了一遍
root ERROR TypeError [ERR_INVALID_ARG_VALUE]: The argument 'options' must have the property "port" or "path". Received [ 3000, 3030 ]
# 又一遍
at Server.listen (net.js:1432:11)
at BackendApplication.<anonymous> (/Users/lannisite/WebstormProjects/webide/node_modules/@theia/core/lib/node/backend-application.js:273:32)
at step (/Users/lannisite/WebstormProjects/webide/node_modules/@theia/core/lib/node/backend-application.js:59:23)
at Object.next (/Users/lannisite/WebstormProjects/webide/node_modules/@theia/core/lib/node/backend-application.js:40:53)
at /Users/lannisite/WebstormProjects/webide/node_modules/@theia/core/lib/node/backend-application.js:34:71
at new Promise (<anonymous>)
at __awaiter (/Users/lannisite/WebstormProjects/webide/node_modules/@theia/core/lib/node/backend-application.js:30:12)
at BackendApplication.start (/Users/lannisite/WebstormProjects/webide/node_modules/@theia/core/lib/node/backend-application.js:217:16)
at /Users/lannisite/WebstormProjects/webide/browser-app/src-gen/backend/server.js:32:28
at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:52:5)
root INFO unzipping the plugin ProxyPluginDeployerEntry {
deployer:
PluginTheiaFileHandler {
unpackedFolder:
'/private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked' },
delegate:
PluginDeployerEntryImpl {
originId: 'local-dir:../plugins/node',
pluginId: 'LocalBurnPlugin.theia',
map: Map {},
changes: [],
acceptedTypes: [],
currentPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/LocalBurnPlugin.theia',
initPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/LocalBurnPlugin.theia',
resolved: true,
resolvedByName: 'LocalDirectoryPluginDeployerResolver' },
deployerName: 'PluginTheiaFileHandler' }
root INFO unzipping the plugin ProxyPluginDeployerEntry {
deployer:
PluginTheiaFileHandler {
unpackedFolder:
'/private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked' },
delegate:
PluginDeployerEntryImpl {
originId: 'local-dir:../plugins/node',
pluginId: 'ai_box.theia',
map: Map {},
changes: [],
acceptedTypes: [],
currentPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/ai_box.theia',
initPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/ai_box.theia',
resolved: true,
resolvedByName: 'LocalDirectoryPluginDeployerResolver' },
deployerName: 'PluginTheiaFileHandler' }
root INFO unzipping the plugin ProxyPluginDeployerEntry {
deployer:
PluginVsCodeFileHandler {
unpackedFolder:
'/private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/vscode-unpacked' },
delegate:
PluginDeployerEntryImpl {
originId: 'local-dir:../plugins/node',
pluginId: 'donjayamanne.githistory-0.6.12.vsix',
map: Map {},
changes: [],
acceptedTypes: [],
currentPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/donjayamanne.githistory-0.6.12.vsix',
initPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/donjayamanne.githistory-0.6.12.vsix',
resolved: true,
resolvedByName: 'LocalDirectoryPluginDeployerResolver' },
deployerName: 'PluginVsCodeFileHandler' }
root INFO unzipping the plugin ProxyPluginDeployerEntry {
deployer:
PluginTheiaFileHandler {
unpackedFolder:
'/private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked' },
delegate:
PluginDeployerEntryImpl {
originId: 'local-dir:../plugins/node',
pluginId: 'node.theia',
map: Map {},
changes: [],
acceptedTypes: [],
currentPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/node.theia',
initPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/node.theia',
resolved: true,
resolvedByName: 'LocalDirectoryPluginDeployerResolver' },
deployerName: 'PluginTheiaFileHandler' }
root INFO unzipping the plugin ProxyPluginDeployerEntry {
deployer:
PluginTheiaFileHandler {
unpackedFolder:
'/private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked' },
delegate:
PluginDeployerEntryImpl {
originId: 'local-dir:../plugins/node',
pluginId: 'scence.theia',
map: Map {},
changes: [],
acceptedTypes: [],
currentPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/scence.theia',
initPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/scence.theia',
resolved: true,
resolvedByName: 'LocalDirectoryPluginDeployerResolver' },
deployerName: 'PluginTheiaFileHandler' }
root INFO unzipping the plugin ProxyPluginDeployerEntry {
deployer:
PluginTheiaFileHandler {
unpackedFolder:
'/private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked' },
delegate:
PluginDeployerEntryImpl {
originId: 'local-dir:../plugins/node',
pluginId: 'taoFactory.theia',
map: Map {},
changes: [],
acceptedTypes: [],
currentPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/taoFactory.theia',
initPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/taoFactory.theia',
resolved: true,
resolvedByName: 'LocalDirectoryPluginDeployerResolver' },
deployerName: 'PluginTheiaFileHandler' }
root INFO unzipping the plugin ProxyPluginDeployerEntry {
deployer:
PluginTheiaFileHandler {
unpackedFolder:
'/private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked' },
delegate:
PluginDeployerEntryImpl {
originId: 'local-dir:../plugins/node',
pluginId: 'taoUnity.theia',
map: Map {},
changes: [],
acceptedTypes: [],
currentPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/taoUnity.theia',
initPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/taoUnity.theia',
resolved: true,
resolvedByName: 'LocalDirectoryPluginDeployerResolver' },
deployerName: 'PluginTheiaFileHandler' }
root INFO unzipping the plugin ProxyPluginDeployerEntry {
deployer:
PluginTheiaFileHandler {
unpackedFolder:
'/private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked' },
delegate:
PluginDeployerEntryImpl {
originId: 'local-dir:../plugins/node',
pluginId: 'theia_mock.theia',
map: Map {},
changes: [],
acceptedTypes: [],
currentPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/theia_mock.theia',
initPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/theia_mock.theia',
resolved: true,
resolvedByName: 'LocalDirectoryPluginDeployerResolver' },
deployerName: 'PluginTheiaFileHandler' }
root INFO unzipping the plugin ProxyPluginDeployerEntry {
deployer:
PluginTheiaFileHandler {
unpackedFolder:
'/private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked' },
delegate:
PluginDeployerEntryImpl {
originId: 'local-dir:../plugins/node',
pluginId: 'tinylink.theia',
map: Map {},
changes: [],
acceptedTypes: [],
currentPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/tinylink.theia',
initPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/tinylink.theia',
resolved: true,
resolvedByName: 'LocalDirectoryPluginDeployerResolver' },
deployerName: 'PluginTheiaFileHandler' }
root INFO unzipping the plugin ProxyPluginDeployerEntry {
deployer:
PluginTheiaFileHandler {
unpackedFolder:
'/private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked' },
delegate:
PluginDeployerEntryImpl {
originId: 'local-dir:../plugins/node',
pluginId: 'unity.theia',
map: Map {},
changes: [],
acceptedTypes: [],
currentPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/unity.theia',
initPath:
'/Users/lannisite/WebstormProjects/webide/plugins/node/unity.theia',
resolved: true,
resolvedByName: 'LocalDirectoryPluginDeployerResolver' },
deployerName: 'PluginTheiaFileHandler' }
root INFO Deploying backend plugin "hello-world-plugin@0.0.1" from "/Users/lannisite/WebstormProjects/hello-world-plugin/lib/hello-world-plugin-backend.js"
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /Users/lannisite/WebstormProjects/webide/plugins/node/.theia
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked/LocalBurnPlugin.theia
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked/ai_box.theia
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/vscode-unpacked/donjayamanne.githistory-0.6.12.vsix
root INFO Resolved "donjayamanne.githistory-0.6.12.vsix" to a VS Code extension "githistory@0.6.12" with engines: { vscode: '^1.38.0' }
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked/node.theia
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /Users/lannisite/WebstormProjects/webide/plugins/node/package.json
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked/scence.theia
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /Users/lannisite/WebstormProjects/webide/plugins/node/src
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked/taoFactory.theia
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked/taoUnity.theia
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked/theia_mock.theia
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked/tinylink.theia
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /Users/lannisite/WebstormProjects/webide/plugins/node/tsconfig.json
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked/unity.theia
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /Users/lannisite/WebstormProjects/webide/plugins/node/webpack.config.js
root INFO PluginTheiaDirectoryHandler: accepting plugin with path /Users/lannisite/WebstormProjects/webide/plugins/node/yarn.lock
root INFO Deploying frontend plugin "LocalBurnPlugin@0.0.1" from "dist/LocalBurnPlugin-frontend.js"
root INFO Deploying backend plugin "githistory@0.6.12" from "/private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/vscode-unpacked/donjayamanne.githistory-0.6.12.vsix/extension/dist/src/extension"
root INFO Deploying frontend plugin "ai_box@0.0.1" from "dist/ai_box-frontend.js"
root INFO Deploying backend plugin "theia-mock@0.0.1" from "/private/var/folders/k7/tb4v_p6j7w7_sjpz91m9f5y40000gn/T/theia-unpacked/theia_mock.theia/lib/theia-mock-backend.js"
root INFO Deploying frontend plugin "node@0.0.1" from "dist/node-frontend.js"
root INFO Deploying frontend plugin "scence@0.0.1" from "dist/scence-frontend.js"
root INFO Deploying frontend plugin "taoFactory@0.0.1" from "dist/taoFactory-frontend.js"
root INFO Deploying frontend plugin "taoUnity@0.0.1" from "dist/taoUnity-frontend.js"
root INFO Deploying frontend plugin "tinylink@0.0.1" from "dist/tinylink-frontend.js"
root INFO Deploying frontend plugin "abc@0.0.1" from "dist/abc-frontend.js"
全部的报错都记录下来了,然后分析一下:似乎就是一个端口问题,就是配置两个参数的问题,然后我去试试。
感觉之前运行成功过一次,就把之前的依赖又往package.json里面添加一下,
结果webpage里面的ide加载不出来了,之后又急忙把新加的依赖一个个删掉之后在yarn
直到可以打开ide,然后试了一下,又可以正常的运行plugin了,挺神奇的。
并且可以找到hello world命令了。