我目前正在开发一个使用 React 和 Typescript 的项目,该项目运行良好,直到最近使用 Jenkins 构建时发生以下错误(并且该错误也出现在我的计算机上的 intellij 中)。似乎是一个模块作为编译错误。
[INFO] Creating an optimized production build...
[INFO] Failed to compile.
[INFO]
[INFO] /jenkins/workspace/project/front/node_modules/jest-diff/build/diffLines.d.ts
[INFO] TypeScript error in /jenkins/workspace/project/front/node_modules/jest-diff/build/diffLines.d.ts(8,13):
[INFO] '=' expected. TS1005
[INFO]
[INFO] 6 | */
[INFO] 7 | import { Diff } from './cleanupSemantic';
[INFO] > 8 | import type { DiffOptions } from './types';
[INFO] | ^
[INFO] 9 | export declare const diffLinesUnified: (aLines: string[], bLines: string[], options?: DiffOptions | undefined) => string;
[INFO] 10 | export …
Run Code Online (Sandbox Code Playgroud) 我目前正在研究RESTFull应用程序,该应用程序可以提供客户端生成的二进制文件。我想知道什么是最佳做法:
我是gradle的新手,但遇到了我不太了解的构建错误。我的项目只是一个空外壳,具有目录结构,没有Java源代码。这是我的根build.gradle文件
allprojects {
//Put instructions for all projects
task hello << { task -> println "I'm $task.project.name" }
}
subprojects {
//Put instructions for each sub project
apply plugin: "java"
repositories {
mavenCentral()
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.+'
}
Run Code Online (Sandbox Code Playgroud)
当我执行gradle build命令时,构建失败,因为它不知道此消息的testCompile方法:
在根项目上找不到参数[{group = junit,name = junit,version = 4. +}]的方法testCompile()
我使用Gradle 2.5。
我知道,此方法是我已加载的java插件的一部分。我看不出出了什么问题,您能帮忙吗?谢谢 !