运行 start-kuzzle-server 因错误而失败

Running start-kuzzle-server fails with error

user1@DESKTOP-8FGN:~/kuzzle/kuzzle$ ./bin/start-kuzzle-server
internal/modules/cjs/loader.js:818
  throw err;
  ^

Error: Cannot find module '../index'
Require stack:
- /home/user1/kuzzle/kuzzle/bin/start-kuzzle-server
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/user1/kuzzle/kuzzle/bin/start-kuzzle-server:32:21)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/user1/kuzzle/kuzzle/bin/start-kuzzle-server' ]
}

正在尝试 运行 在 ubuntu20 上开发环境:

我觉得是路径问题

解决方案是使用 npm 构建应用程序

npm run build

> kuzzle@2.8.0 build /home/user1/kuzzle/kuzzle
> npm run build-ts


> kuzzle@2.8.0 build-ts /home/user1/kuzzle/kuzzle
> tsc

TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/kuzzleError.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/kuzzleError.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/kuzzleError.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/internalError.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/internalError.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/internalError.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/api/request/requestInput.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/api/request/requestInput.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/api/request/requestInput.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/core/shared/sdk/embeddedSdk.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/core/shared/sdk/embeddedSdk.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/core/shared/sdk/embeddedSdk.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/badRequestError.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/badRequestError.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/badRequestError.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/externalServiceError.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/externalServiceError.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/externalServiceError.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/forbiddenError.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/forbiddenError.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/forbiddenError.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/gatewayTimeoutError.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/gatewayTimeoutError.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/gatewayTimeoutError.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/notFoundError.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/notFoundError.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/notFoundError.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/partialError.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/partialError.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/partialError.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/pluginImplementationError.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/pluginImplementationError.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/pluginImplementationError.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/serviceUnavailableError.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/serviceUnavailableError.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/serviceUnavailableError.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/sizeLimitError.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/sizeLimitError.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/sizeLimitError.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/unauthorizedError.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/unauthorizedError.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/unauthorizedError.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/preconditionError.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/preconditionError.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/preconditionError.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/tooManyRequestsError.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/tooManyRequestsError.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/tooManyRequestsError.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/index.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/index.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/kerror/errors/index.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/core/application/backend.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/core/application/backend.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/core/application/backend.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/index.js
TSFILE: /home/user1/kuzzle/kuzzle/index.js.map
TSFILE: /home/user1/kuzzle/kuzzle/index.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/core/plugin/pluginContext.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/core/plugin/pluginContext.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/core/plugin/pluginContext.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/ControllerDefinition.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/ControllerDefinition.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/ControllerDefinition.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/PluginManifest.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/PluginManifest.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/PluginManifest.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/StrategyDefinition.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/StrategyDefinition.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/StrategyDefinition.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/EventHandler.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/EventHandler.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/EventHandler.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/Plugin.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/Plugin.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/Plugin.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/Controller.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/Controller.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/Controller.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/RequestPayload.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/RequestPayload.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/RequestPayload.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/ResponsePayload.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/ResponsePayload.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/ResponsePayload.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/Deprecation.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/Deprecation.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/Deprecation.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/User.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/User.js.map

TSFILE: /home/user1/kuzzle/kuzzle/lib/types/User.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/Token.js

TSFILE: /home/user1/kuzzle/kuzzle/lib/types/Token.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/Token.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/InternalLogger.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/InternalLogger.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/InternalLogger.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/index.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/index.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/types/index.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/api/request/requestResponse.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/api/request/requestResponse.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/api/request/requestResponse.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/api/request/requestContext.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/api/request/requestContext.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/api/request/requestContext.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/api/request/kuzzle-request.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/api/request/kuzzle-request.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/api/request/kuzzle-request.d.ts
TSFILE: /home/user1/kuzzle/kuzzle/lib/api/request/index.js
TSFILE: /home/user1/kuzzle/kuzzle/lib/api/request/index.js.map
TSFILE: /home/user1/kuzzle/kuzzle/lib/api/request/index.d.ts
user1@DESKTOP-8FGN:~/kuzzle/kuzzle$ ./bin/start-kuzzle-server
[ℹ] Starting Kuzzle 2.8.0 ...

缺失的'index'已建成...