Eclipse Dart:如何将序言文件设置为在命令行上运行?

Eclipse Dart:如何将序言文件设置为在命令行上运行?,eclipse,dart,server-side,Eclipse,Dart,Server Side,我将eclipse与dart插件一起使用,当我运行“pub build”时,我得到了以下结果。 我用Tomcat将构建的目录移动到VPS,客户端代码运行正常 如何运行服务器端代码(TreeFilesystemServer.dart)? 因为我有一些服务器端代码,结果显示我可能会提供一个前导文件。 我必须提供序言文件吗?前言文件是什么意思 提前谢谢 1.My project framework. Main --web --allyEdit --TreeFilesystemServer.

我将eclipse与dart插件一起使用,当我运行“pub build”时,我得到了以下结果。
我用Tomcat将构建的目录移动到VPS,客户端代码运行正常

如何运行服务器端代码(TreeFilesystemServer.dart)? 因为我有一些服务器端代码,结果显示我可能会提供一个前导文件。
我必须提供序言文件吗?前言文件是什么意思

提前谢谢

1.My project framework.
Main
--web
  --allyEdit
    --TreeFilesystemServer.dart  <=(this is a server side code)
  --Main.css
  --Main.dart  <=(this is the entry point of client )
  --Main.html
--pubspec.lock
--pubspec.yaml


2.Below is the message when I run pub build.
[Info from Dart2JS]:  
Compiling allyEdit_dart|web/allyEdit/TreeFilesystemServer.dart...  
[Warning from Dart2JS on allyEdit_dart|web/allyEdit/TreeFilesystemServer.dart]:  

When run on the command-line, the compiled output might require a preamble file located in:
<sdk>/lib/_internal/lib/preambles.  

[Info from Dart2JS]:  
Took 0:00:04.534259 to compile allyEdit_dart|web/allyEdit/TreeFilesystemServer.dart.  
Built 1649 files to "build".
1.My项目框架。
主要
--网
--阿利耶迪特
--TreeFilesystemServer.dart用于dart2js编译输出的“序言文件”是一个javascript文件,它设置了一个与浏览器非常相似的JS环境,以便可以在浏览器之外运行dart2js输出

Dart项目的测试既可以在浏览器中运行,也可以在基于v8的“d8”独立JavaScript shell中运行,还可以在“jsshell”中运行,后者是Mozilla JS引擎的独立版本。 对于最后两种情况,编译后的代码需要在编译后的脚本之前执行一个“前导文件”。dart2js序言文件位于sdk/lib/_internal/compiler/js_lib/preambles中-它们是半最近移动到这里的,因此一些旧的引用可能指向不同的位置

如果只在浏览器中运行dart2js编译代码,则不需要提供序言文件。
如果您想在d8中测试输出,则需要d8前导文件(用于设置打印挂钩并模拟计时器)。

我从未听说过这样的问题。你能提供更多关于你的应用程序包目录的信息吗?通常,您只需要一个
pubspec.yaml
文件和一个
*.dart
文件,其中包含服务器端代码的
main()
,以及客户端
web
目录中的
index.html
some.dart
文件(至少从开始)。然后,当您从包含
pubspec.yaml
文件的目录运行
pub build
时,应将
web
目录构建为JavaScript。当您从命令行调用
pub build
时会发生什么?您是说“我必须提供…”但是消息清楚地表明构建成功了,可能需要一个序言文件。这可能与您是否有不兼容版本的Dart SDK和Eclipse Dart插件有关?