我可以启动我的ember应用程序,但屏幕上没有加载任何内容,我在浏览器控制台日志中注意到这个错误。知道我会错过什么吗?
ember发球
WARNING: Node v16.14.2 is not tested against Ember CLI on your platform. We recommend that you use the most-recent "Active LTS" version of Node.js. See https://git.io/v7S5n for details.
Running without permission to symlink will degrade build performance.
See https://cli.emberjs.com/release/appendix/windows/ for details.
File added: "package.json"
Server restarted.
file changed index.js.map
Build successful (8338ms) – Serving on http://localhost:4200/
Slowest Nodes (totalTime >= 5%) | Total (avg)
------------------------------------------------------------------------------------------------------------+---------------------------
Babel: @ember/test-helpers (1) | 2631ms
Bundler (1) | 1011ms
BroccoliRollup (6) | 1008ms (168 ms)
ember-auto-import-analyzer (3) | 626ms (208 ms)
Package /assets/vendor.js (1) | 569ms
Build successful (566ms) – Serving on http://localhost:4200/
Slowest Nodes (totalTime >= 5%) | Total (avg)
------------------------------------------------------------------------------------------------------------+---------------------------
Package /assets/vendor.js (1) | 79ms
Concat: Vendor Styles/assets/vendor.css (1) | 72ms
Funnel (54) | 42ms (0 ms)
这是控制台错误
loader.js:247
Uncaught Error: Could not find module `undefined/app` imported from `(require)`
at missingModule (loader.js:247:1)
at findModule (loader.js:258:1)
at requireModule (loader.js:24:1)
at app-boot.js:3:1
1条答案
按热度按时间9rygscc11#
在Ember很难找到破损的进口产品。你会收到一条与你收到的消息类似的普通消息,很少或根本没有找到问题所在的指导。
当我遇到这种情况时,我会做以下几件事来隔离问题:
1.在调试器中选中“捕获异常时暂停”,重新加载应用程序。有时,您会找到罪魁祸首代码,或者至少找到一个可以跟踪堆栈到其源代码的位置。(您必须跳过一堆垃圾异常。)
1.在模板中添加模板日志
{{log "this route works"))
,从模板/路由树中最外层/最顶层的模板开始。正确记录的模板可能不是问题所在,因此至少您知道不应该在哪里查找。祝你好运,找到源头。我很想知道是否有人找到了解决这个问题的更好的方法。