只是为这个问题添加了更多信息,我仍然没有设法解决。在我看来,这是这一行:
import * as THREE from "../libs/three.js/build/three.module.js";
在导致执行崩溃的 potree 示例文件夹中的 html 文件的脚本部分。因为如果我注释掉该行之后直到标记之前的所有内容,并在该行之前的行中添加一个警告,如下所示:
<script type="module">
alert("ok");
import * as THREE from "../libs/three.js/build/three.module.js";
/*
...
*/
</script>
,将不会弹出警报。但是,如果我也注释掉 '... TREE ...' 导入行,如下所示:
<script type="module">
alert("ok");
/*
import * as THREE from "../libs/three.js/build/three.module.js";
...
*/
</script>
,现在将弹出警报。那个“../libs/three.js/build/three.module.js”文件虽然存在。
这是我从我的 Visual Studio Flask 项目运行 Web 服务器时的控制台输出(这在 6 个月前工作过):
Serving Flask app 'MyPotreeTest' (lazy loading)
Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
Debug mode: off
Running on http://localhost:1234/ (Press CTRL+C to quit)
127.0.0.1 - - [28/Sep/2022 17:26:37] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:37] "GET /static/css/s2_bstreeview.min.css HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:37] "GET /static/scripts/modernizr-2.6.2.js HTTP/1.1" 404 -
127.0.0.1 - - [28/Sep/2022 17:26:37] "GET /static/scripts/s2_bstreeview.min.js HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:38] "GET /static/Ico/favicon.ico HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:43] "GET /login HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:43] "GET /static/scripts/modernizr-2.6.2.js HTTP/1.1" 404 -
127.0.0.1 - - [28/Sep/2022 17:26:52] "POST /login HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:52] "GET /static/scripts/modernizr-2.6.2.js HTTP/1.1" 404 -
127.0.0.1 - - [28/Sep/2022 17:26:54] "GET /td_viewer/ HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:54] "GET /static/css/s2_bstreeview.min.css HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:54] "GET /static/scripts/s2_bstreeview.min.js HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:54] "GET /static/scripts/modernizr-2.6.2.js HTTP/1.1" 404 -
127.0.0.1 - - [28/Sep/2022 17:26:55] "GET /static//Potree/examples/geopackage.html HTTP/1.1" 308 -
127.0.0.1 - - [28/Sep/2022 17:26:55] "GET /static/Potree/examples/geopackage.html HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:55] "GET /static/Potree/build/potree/potree.css HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:55] "GET /static/Potree/libs/jquery-ui/jquery-ui.min.css HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:55] "GET /static/Potree/libs/openlayers3/ol.css HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:55] "GET /static/Potree/libs/spectrum/spectrum.css HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:55] "GET /static/Potree/libs/jstree/themes/mixed/style.css HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:55] "GET /static/Potree/libs/jquery/jquery-3.1.1.min.js HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:55] "GET /static/Potree/libs/spectrum/spectrum.js HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:56] "GET /static/Potree/libs/jquery-ui/jquery-ui.min.js HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:56] "GET /static/Potree/libs/other/BinaryHeap.js HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:56] "GET /static/Potree/libs/tween/tween.min.js HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:56] "GET /static/Potree/libs/d3/d3.js HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:56] "GET /static/Potree/libs/proj4/proj4.js HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:56] "GET /static/Potree/libs/openlayers3/ol.js HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:56] "GET /static/Potree/libs/i18next/i18next.js HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:56] "GET /static/Potree/libs/jstree/jstree.js HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:56] "GET /static/Potree/build/potree/potree.js HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:56] "GET /static/Potree/libs/plasio/js/laslaz.js HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:56] "GET /static/Potree/libs/three.js/build/three.module.js HTTP/1.1" 200 -
127.0.0.1 - - [28/Sep/2022 17:26:56] "GET /static/Potree/build/potree/resources/images/background.jpg HTTP/1.1" 200 -
任何帮助将不胜感激。我尝试像 6 个月前上次运行它时那样,将 1.8 版以及调试版本下载并复制到我的 Web 服务器,我还尝试使用 node 和 npm 安装它,如所述在“https://github.com/potree/potree”页面上,但这也没有任何改变。
我确定这一定是一些非常简单的设置或库版本问题,尽管我已经尝试使用与上次完全相同的文件。我根本无法弄清楚为什么它不运行。