瓦丁:再次:构建完全停滞



我第二次遇到这种情况,Vaadin版本的更改完全停止了我的构建过程:

这个问题始于我想让我的项目——它一直在构建和执行——尝试将其从Vaadin 18.0.2更新到20.0.2。奇怪的是,这并没有奏效:虽然项目构建良好,启动时也没有出现错误或异常,但UI没有显示。所有加载启动页面的尝试都只产生了一个蓝色的进度条,它很快进展到屏幕中间,然后变得越来越慢,最终请求超时。没有错误消息,只是什么都没有:-(已经非常令人失望了!

因此,我将pom.xml中的Vaadin版本恢复到v18.0.2,现在我被卡住了。在尝试构建项目时,我遇到了以下错误:

...
[INFO] --- vaadin-maven-plugin:18.0.2:build-frontend (default) @ kis-monitoring ---
[INFO] Scanning classes to find frontend configurations and dependencies...
[INFO] Visited 2737 classes. Took 3034 ms.
[INFO] Visited 141 classes. Took 61 ms.
[INFO] writing file U:workspace_Vaadinmy_projecttargetflow-frontendpackage.json.
[INFO] writing file U:workspace_Vaadinmy_projecttargetflow-frontendformpackage.json.
[INFO] writing file 'U:workspace_Vaadinmy_projecttargetindex.html'
[INFO] writing file 'U:workspace_Vaadinmy_projecttargetindex.ts'
[INFO] Parsing java files from [U:workspace_Vaadinmy_projectsrcmainjava]
[INFO] There are no connect endpoints to generate.
[INFO] Running `pnpm install` to resolve and optionally download frontend dependencies. This may take a moment, please stand by...
[INFO] Generated pnpmfile hook file: 'U:workspace_Vaadinmy_projectpnpmfile.js'
[INFO] installing pnpm version 4.4.0 locally
[INFO] using 'C:Usersmms.vaadinnodenode.exe C:Usersmms.vaadinnode_modulespnpmbinpnpm.js' for frontend package installation
[ERROR] Command `C:Usersmms.vaadinnodenode.exe C:Usersmms.vaadinnode_modulespnpmbinpnpm.js --shamefully-hoist=true install` failed:
Using hooks from: U:workspace_Vaadinmy_projectpnpmfile.jsreadPackage hook is declared. Manifests of dependencies might get overridden?WARN? Your pnpm-lock.yaml was generated by a newer version of pnpm. It is a compatible version but it might get downgraded to version 5.1?WARN? deprecated html-webpack-plugin@3.2.0: 3.x is no longer supported?ERROR? No package.json (or package.yaml, or package.json5) was found in "U:workspace_Vaadinmy_projecttargetpluginsstats-plugin".
[ERROR] >>> Dependency ERROR. Check that all required dependencies are deployed in pnpm repositories.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

上次我碰到这座大楼时,我花了很长时间试图再次得到这座大楼!我尝试了";Vaadin dance";,我从我的系统中卸载了与node.js、npm、rnpm等相关的所有内容,并且做了更多的工作,但没有任何帮助来解决这个问题。最后,唯一有效的修复方法是从头开始重新启动我的项目,创建并下载一个新生成的helloworld程序,并在其中复制我的源代码。

这一次,我想了解这里发生了什么,以及如何在不从头开始的情况下解决这种情况!如何/为什么更改Vaadin版本并稍后将其改回会导致此构建问题?到底需要什么才能让它重新发挥作用?

随着从V20到V18的跳跃,V19引入了新的主题化功能,该功能使用使用npm/pnpm安装的webpack插件,并且package.json获得devDependencies:

"@vaadin/application-theme-plugin": "./target/plugins/application-theme-plugin",
"@vaadin/stats-plugin": "./target/plugins/stats-plugin",
"@vaadin/theme-live-reload-plugin": "./target/plugins/theme-live-reload-plugin",
"@vaadin/theme-loader": "./target/plugins/theme-loader",

在mvn清理之后,这些将不存在,v18也不知道这一点来清除它们。

重要信息隐藏在[ERROR] >>> Dependency ERRORNo package.json (or package.yaml, or package.json5) was found in "U:workspace_Vaadinmy_projecttargetpluginsstats-plugin".的末尾

要再次运行V18,您应该删除针对./target/*的devDependencies,并可能清除~/.vaadin,以便pnpm版本是正确的。

18岁失败的原因->20我不能说,因为你没有提供任何信息,但20->18失败是因为20具有新功能,这些新功能没有被自动删除以进行降级,因为18是EOL并且降级是不期望的。

最新更新