spring - 是否可以使用gradle构建vaadin 14 Spring项目?

标签 spring spring-boot gradle intellij-idea vaadin

当我在intellij Idea中创建并运行它时,从控制台输出了以下内容,但是在一分钟前我初始化了一个React应用程序时,该节点已配置为使用代理。

java.lang.RuntimeException: Unable to initialize Vaadin DevModeHandler Failed to determine 'npm.cmd' tool. Please install it either:

  • by following the https://nodejs.org/en/download/ guide to install it globally
  • or by running the frontend-maven-plugin goal to install it in this project: $ mvn com.github.eirslett:frontend-maven-plugin:1.7.6:install-node-and-npm -DnodeVersion="v10.16.0"

最佳答案

您需要与前端Maven插件等效的gradle
尝试一下:

// build.gradle
plugins {
    id 'org.siouan.frontend' version '1.1.0'
}

frontend {
    nodeVersion = '12.14.0'
}

之后,您需要使用gradle build命令编译项目。

问候!

关于spring - 是否可以使用gradle构建vaadin 14 Spring项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58197599/

相关文章:

java - Spring 安全: public API to register new user

java - 运行 Grails 项目时出错

java - Spring Quartz重新安排作业第一次执行两次

spring - Spring 和 Spring Boot 的区别

linux - 如何在 Windows 和 Linux 的@PropertySource 注释中保留通用文件路径

java - 将本地插件添加到 Gradle 项目

spring - 响应式(Reactive) Spring Mono 和 doOnNext

java - 使用 Caffeine 在 Spring Boot 中进行缓存

windows - Windows:无法从Groovy脚本执行gradle命令

java - 什么是 Maven 存储库网站中的托管依赖项?