无法编译jhipster示例应用程序nodejs应用程序



我已经从github(链接(克隆了jhipster示例应用程序nodejs。

我已经遵循了编译和运行应用程序的所有说明

我已经安装了执行(npm,nodejs,yo(所需的所有工具

当我尝试用npm start运行我的应用程序时,会出现以下错误消息:

return new TSError(diagnosticText, diagnosticCodes)
^
TSError: ⨯ Unable to compile TypeScript:
src/web/rest/user.controller.ts:29:54 - error TS2345: Argument of type 'string | Query | (string | Query)[]' is not assignable to parameter of type 'string | number'.
Type 'Query' is not assignable to type 'string | number'.
Type 'Query' is not assignable to type 'string'.
29     const pageRequest: PageRequest = new PageRequest(req.query.page, req.query.size, req.query.sort);
~~~~~~~~~~~~~~
at createTSError (C:UsersunameDesktoptestjhipster-sample-app-nodejs-masterservernode_modulests-nodesrcindex.ts:240:12)
at reportTSError (C:UsersunmaeDesktoptestjhipster-sample-app-nodejs-masterservernode_modulests-nodesrcindex.ts:244:19)
at getOutput (C:UsersunameDesktoptestjhipster-sample-app-nodejs-masterservernode_modulests-nodesrcindex.ts:360:34)
at Object.compile (C:UsersunameDesktoptestjhipster-sample-app-nodejs-masterservernode_modulests-nodesrcindex.ts:393:11)
at Module.m._compile (C:UsersunameDesktoptestjhipster-sample-app-nodejs-masterservernode_modulests-nodesrcindex.ts:439:43)
at Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Object.require.extensions.<computed> [as .ts] (C:UsersunameDesktoptestjhipster-sample-app-nodejs-masterservernode_modulests-nodesrcindex.ts:442:12)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1042:19)
[nodemon] app crashed - waiting for file changes before starting...

有人能帮我纠正这个错误吗?

提前谢谢。

这个问题在NodeJS蓝图中报告,并在这个pull请求中修复。包含修复程序的蓝图的新版本尚未发布。示例应用程序使用最新版本,因此包含此问题。

修复方法是更新server/package.json文件,如相关Github问题所述

"devDependencies": {
"@types/express-serve-static-core": "4.17.3",

最新更新