如何解决前端编译中的递归 - 如何分析和调试?
我对基于 Vaadin 的应用程序进行了一些更改,现在在尝试启动应用程序时出现以下前端编译错误。
那个输出并没有给我任何关于这里可能有什么问题的线索。所涉及的类或文件似乎都不是来自我的应用程序。这个“VaadindevmodeGizmo”到底是什么? 如何调试或分析这个???
------------------ Starting Frontend compilation. ------------------
[0m2021-06-03 23:15:34,823 DEBUG [task-2] com.vaadin.flow.server.DevModeHandler:
C:\Program Files\nodejs\node.exe \
.\node_modules\webpack-dev-server\bin\webpack-dev-server.js \
--config \
.\webpack.config.js --port 58180 \
--watchDogPort=58179 -d --inline=false
2021-06-03 23:15:34,831 INFO [task-2] com.vaadin.flow.server.DevModeHandler: Running webpack to compile frontend resources. This may take a moment,please stand by...
2021-06-03 23:15:34,862 INFO [http-nio-8080-exec-2] com.vaadin.flow.server.DefaultDeploymentConfiguration:
Vaadin is running in DEBUG MODE.
When deploying application for production,remember to disable debug features. See more from https://vaadin.com/docs/
Using Vaadin 15+ bootstrap mode.
'index.html' is not found from 'D:\Projects\my_app\frontend\index.html'.
Generating a default one in 'target/index.html'. Move it to the 'D:\Projects\my_app\frontend' folder if you want to customize it.
'index.ts' is not found from 'D:\Projects\my_app\frontend\index.ts'.
Generating a default one in 'target/index.ts'. Move it to the 'D:\Projects\my_app\frontend' folder if you want to customize it.
2021-06-03 23:15:35,974 DEBUG [http-nio-8080-exec-2] com.vaadin.flow.server.communication.PushRequestHandler: Using pre-initialized Atmosphere for servlet springServlet
2021-06-03 23:15:35,978 DEBUG [http-nio-8080-exec-2] com.vaadin.flow.server.VaadinServletService: Using 'com.vaadin.flow.server.communication.IndexHtmlRequestHandler' in client mode bootstrapping
2021-06-03 23:15:35,982 DEBUG [http-nio-8080-exec-2] com.vaadin.flow.server.VaadinService: The application has the following routes:
2021-06-03 23:15:35,990 DEBUG [http-nio-8080-exec-2] java.util.stream.ForEachOps$ForEachOp$OfRef: RouteData{parentLayout=class my_app.ui.MainLayout,url='',parameters={},navigationTarget=class my_app.ui.views.apps.EntryView,routealiases=[]}
2021-06-03 23:15:35,url='application/:___url_parameter*',parameters={___url_parameter=com.vaadin.flow.router.RouteParameterData@27361303},navigationTarget=class my_app.ui.views.apps.ApplicationView,990 DEBUG [http-nio-8080-exec-2] java.util.stream.ForEachOps$ForEachOp$OfRef: RouteData{parentLayout=null,url='login',navigationTarget=class my_app.ui.views.login.LoginView,url='tabsheet',navigationTarget=class my_app.ui.views.apps.TabSheetView,routealiases=[]}
Project is running at http://localhost:58180/webpack-dev-server/
webpack output is served from /VAADIN/
Content not from webpack is served from D:\Projects\my_app\target\classes\meta-inf\VAADIN,src/main/webapp
Serving the 'stats.json' file dynamically.
Hash: 8e0c76d4c08e28550144
Version: webpack 4.42.0
Time: 122ms
Built at: 03.06.2021 23:15:38
Asset Size Chunks Chunk Names
index.html 2.69 KiB [emitted]
ERROR in Entry module not found: Error: Recursion in resolving
Stack:
resolve: (D:\Projects\my_app\frontend) D:\Projects\my_app\target\flow-frontend\VaadindevmodeGizmo.js
newResolve: (D:\Projects\my_app\frontend) D:\Projects\my_app\target\flow-frontend\VaadindevmodeGizmo.js
parsedResolve: (D:\Projects\my_app\frontend) D:\Projects\my_app\target\flow-frontend\VaadindevmodeGizmo.js
describedResolve: (D:\Projects\my_app\frontend) D:\Projects\my_app\target\flow-frontend\VaadindevmodeGizmo.js
relative: (D:\Projects\my_app\target\flow-frontend\VaadindevmodeGizmo.js)
describedRelative: (D:\Projects\my_app\target\flow-frontend\VaadindevmodeGizmo.js)
rawFile: (D:\Projects\my_app\target\flow-frontend\VaadindevmodeGizmo.js)
file: (D:\Projects\my_app\target\flow-frontend\VaadindevmodeGizmo.js)
ERROR in Entry module not found: Error: Recursion in resolving
Stack:
resolve: (D:\Projects\my_app\frontend) D:\Projects\my_app\target\index
newResolve: (D:\Projects\my_app\frontend) D:\Projects\my_app\target\index
parsedResolve: (D:\Projects\my_app\frontend) D:\Projects\my_app\target\index
describedResolve: (D:\Projects\my_app\frontend) D:\Projects\my_app\target\index
relative: (D:\Projects\my_app\target\index)
describedRelative: (D:\Projects\my_app\target\index)
rawFile: (D:\Projects\my_app\target\index)
file: (D:\Projects\my_app\target\index)
ERROR in Error: Child compilation Failed:
Entry module not found: Error: Recursion in resolving
Stack:
resolve: (D:\Projects\my_app\frontend) D:\Proje cts\my_app\target\index.html
newResolve: (D:\Projects\my_app\frontend) D:\Pr ojects\my_app\target\index.html
parsedResolve: (D:\Projects\my_app\frontend) D: \Projects\my_app\target\index.html
describedResolve: (D:\Projects\my_app\frontend) D:\Projects\my_app\target\index.html
relative: (D:\Projects\my_app\target\index.html )
describedRelative: (D:\Projects\my_app\target\i ndex.html)
rawFile: (D:\Projects\my_app\target\index.html)
file: (D:\Projects\my_app\target\index.html) :
Error: Recursion in resolving
Stack:
resolve: (D:\Projects\my_app\frontend) D:\Proje cts\my_app\target\index.html
newResolve: (D:\Projects\my_app\frontend) D:\Pr ojects\my_app\target\index.html
parsedResolve: (D:\Projects\my_app\frontend) D: \Projects\my_app\target\index.html
describedResolve: (D:\Projects\my_app\frontend) D:\Projects\my_app\target\index.html
relative: (D:\Projects\my_app\target\index.html )
describedRelative: (D:\Projects\my_app\target\i ndex.html)
rawFile: (D:\Projects\my_app\target\index.html)
file: (D:\Projects\my_app\target\index.html)
- compiler.js:79
[application]/[3.2.0_webpack@4.42.0]/[html-webpack-plugin]/lib/compiler.js:7 9:16
- Compiler.js:343
[application]/[4.42.0_webpack@4.42.0]/[webpack]/lib/Compiler.js:343:11
- Compiler.js:681
[application]/[4.42.0_webpack@4.42.0]/[webpack]/lib/Compiler.js:681:15
- Hook.js:154 AsyncSeriesHook.lazyCompileHook
[application]/[1.1.3]/[tapable]/lib/Hook.js:154:20
- Compiler.js:678
[application]/[4.42.0_webpack@4.42.0]/[webpack]/lib/Compiler.js:678:31
- Hook.js:154 AsyncSeriesHook.lazyCompileHook
[application]/[1.1.3]/[tapable]/lib/Hook.js:154:20
- Compilation.js:1423
[application]/[4.42.0_webpack@4.42.0]/[webpack]/lib/Compilation.js:1423:35
Child html-webpack-plugin for "index.html":
ERROR in Entry module not found: Error: Recursion in resolving
Stack:
resolve: (D:\Projects\my_app\frontend) D:\Projects\my_app\target\index.html
newResolve: (D:\Projects\my_app\frontend) D:\Projects\my_app\target\index.html
parsedResolve: (D:\Projects\my_app\frontend) D:\Projects\my_app\target\index.html
describedResolve: (D:\Projects\my_app\frontend) D:\Projects\my_app\target\index.html
relative: (D:\Projects\my_app\target\index.html)
describedRelative: (D:\Projects\my_app\target\index.html)
rawFile: (D:\Projects\my_app\target\index.html)
file: (D:\Projects\my_app\target\index.html)
Failed to compile.
------------------ Frontend compilation Failed. ------------------
解决方法
VaadinDevmodeGizmo
是实时重新加载小部件,应驻留在流客户端 jar 中,在准备前端步骤中应将其复制到 target/flow-frontend
目录中。
然后,该文件夹由 (p)npm 通过 node_modules/@vaadin/flow-frontend
中的依赖项 "@vaadin/flow-frontend": "./target/flow-frontend",
链接到 package.json
。
我不明白的是它试图解决什么来获得递归。它是否一直在解析 D:\Projects\my_app\frontend
,因为其余的似乎是对路径的预期。
如果您添加到 webpack.config.js
{
stats: {
logging: 'log'
}
}
进入module.exports = merge(flowDefaults,)
也可以尝试使用 verbose
,因为如果有大量折叠数据,它可能会提供更多信息。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。