[Bug]: Build fails with "Unknown cli flag: --scripts-prepend-node-path" due to outdated Spotless plugin
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- java
- 领域
- build-system
调研方向
找到声明 Spotless 插件的 Gradle 配置,并检查构建使用的版本。运行 ./gradlew build,重点关注 :test-support:spotlessJava;当构建完成且没有出现 npm --scripts-prepend-node-path 错误时即表示完成。
由索引模型根据 Issue 内容生成。
描述
Module
Core
Testcontainers version
latest master
Using the latest Testcontainers version?
Yes
Host OS
macOS
Host Arch
arm
Docker version
Client:
Version: 29.7.2
API version: 1.55
Go version: go1.26.5
Git commit: a7dcaa6
Built: Wed Aug 5 18:27:50 2026
OS/Arch: darwin/arm64
Context: desktop-linux
Server: Docker Desktop 4.87.0 (236836)
Engine:
Version: 29.7.2
API version: 1.55 (minimum version 1.40)
Go version: go1.26.5
Git commit: 6a43e3d
Built: Wed Aug 5 18:28:35 2026
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: v2.2.5
GitCommit: e53c7c1516c3b2bff98eb76f1f4117477e6f4e66
runc:
Version: 1.3.6
GitCommit: v1.3.6-0-g491b69ba
docker-init:
Version: 0.19.0
GitCommit: de40ad0
What happened?
The Gradle build fails with an error related to the Spotless plugin when it tries to run prettier. The error is:
npm error Unknown cli flag: --scripts-prepend-node-path
This happens because the version of Spotless used by the project does not support this npm flag. The issue was fixed upstream in Spotless version 8.10.1 (see diffplug/spotless#3024).
Expected behavior
The build should complete successfully without npm-related errors.
Current behavior
The build fails during the :test-support:spotlessJava task.
Steps to reproduce
- Clone the repository.
- Run
./gradlew build.
Proposed solution
Update the Spotless plugin to version 8.10.1 or later.
Relevant log output
> Task :test-support:spotlessJava FAILED
...
npm error Unknown cli flag: --scripts-prepend-node-path
...
Additional Information
No response
- 主要语言
- Java
- 星标
- 8.7k
- 派生
- 1.9k
- 平均合并
- 2 天 17 小时
- 30 天内合并 PR
- 9
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
testcontainers/testcontainers-java 的其他 Issue
-
[Enhancement]: Document why singleton containers are required under Spring's test context caching 未关闭type/enhancement
难度 1/5 1 小时以内 新手友好度 85/100
testcontainers/testcontainers-java#11967 ·
-
type/bug
难度 2/5 1-3 小时 新手友好度 78/100
testcontainers/testcontainers-java#11941 ·
-
type/bug
难度 2/5 1-3 小时 新手友好度 74/100
testcontainers/testcontainers-java#11829 · 1 条评论 ·
-
type/enhancement
难度 2/5 1-3 小时 新手友好度 65/100
testcontainers/testcontainers-java#11578 ·
-
help wanted type/feature
难度 2/5 1-3 小时 新手友好度 68/100
testcontainers/testcontainers-java#8657 · 4 条评论 ·
查看 testcontainers/testcontainers-java 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
bug needs triage
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 1/5 1 小时以内 新手友好度 94/100
objectionary/hone-maven-plugin#1061 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
spring-projects/spring-modulith#1895 ·