关于Node Modules的警告问题,JHipster最新版本能否解决?
Great question! Let’s walk through each of your deprecation warnings and confirm whether JHipster’s latest stable releases address them:
@types/jest-diff@24.3.0deprecation: This warning happens because the stub type definition is no longer necessary—jest-diffnow includes its own official type definitions. JHipster’s recent versions have updated their Jest dependency stack to modern releases, which automatically remove this redundant@types/jest-diffpackage. You won’t see this warning in new JHipster projects or after upgrading an existing one to the latest version.swagger-ui@2.2.10deprecation: JHipster moved past Swagger UI v2 years ago. The latest versions use Swagger UI v3 (or even newer OpenAPI-compliant tooling) by default, so this outdated, unmaintained dependency is completely removed from the project template.core-js@1.2.7andcore-js@2.6.11deprecations: Both of these relate to end-of-lifecore-jsbranches. JHipster now fully relies oncore-js@3(the actively maintained and supported branch) across all its project templates. Upgrading to the latest JHipster will replace all oldcore-jsreferences with v3, eliminating both of these warnings.cross-spawn-async@2.2.5deprecation:cross-spawn-asyncwas replaced by the simplercross-spawnpackage years ago, and JHipster’s dependency tree has long since switched to usingcross-spawndirectly. This deprecated package won’t appear in any recent JHipster project.
Final Takeaway
All of the deprecation warnings you listed are resolved in JHipster’s latest stable versions. The JHipster team regularly audits and updates dependencies to avoid using unmaintained packages, so creating a new project with the latest JHipster CLI or upgrading an existing project should clear up all these npm warnings.
内容的提问来源于stack exchange,提问作者John

