javascript - 在 Windows 本地主机中安装 Wiki.js
问题描述
我正在尝试在 Windows 10 localhost 上安装到 Wiki.js。做节点服务器时出现以下错误
(node:11360) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toString' of null
at Object.init (C:\wiki\server\core\db.js:35:37)
at Object.init (C:\wiki\server\core\kernel.js:13:35)
at Object. (C:\wiki\server\index.js:35:13)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
(node:11360) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:11360) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
我有以下内容:节点版本 v12.16.1 npm 版本 6.13.4 MySQL Ver 15.1 Distrib 10.4.11-MariaDB,适用于 Win64 (AMD64),源版本 7c2c420b70b19cc02b5281127205e876f3919dad
任何帮助表示赞赏
解决方案
您好,我解决了这个问题,我只是在我的数据库中输入了一个密码并在配置文件中报告了它,但是我有另一个问题,(我使用 mySQL 服务器和 Apache 服务器)在安装的最后一步我有这个错误。
PS C:\wiki> node server
Loading configuration from C:\wiki\config.yml... OK
2022-01-21T08:55:01.300Z [MASTER] info: =======================================
2022-01-21T08:55:01.304Z [MASTER] info: = Wiki.js 2.5.268 =====================
2022-01-21T08:55:01.309Z [MASTER] info: =======================================
2022-01-21T08:55:01.310Z [MASTER] info: Initializing...
2022-01-21T08:55:24.541Z [MASTER] info: Using database driver pg for postgres [ OK ]
2022-01-21T08:55:24.551Z [MASTER] info: Connecting to database...
node:assert:171
throw err;
^
AssertionError [ERR_ASSERTION]: unknown message code: 59
at Parser.handlePacket (C:\wiki\node_modules\pg-protocol\dist\parser.js:140:34)
at Parser.parse (C:\wiki\node_modules\pg-protocol\dist\parser.js:39:38)
at Socket.<anonymous> (C:\wiki\node_modules\pg-protocol\dist\index.js:11:42)
at Socket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:199:23) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: undefined,
operator: 'fail'
}
推荐阅读
- android - UnityEngine.Videoplayer 不在 IOS 设备上渲染视频
- c - 奇怪的只读符号显示为 nm 中的初始化数据部分 (D)
- node.js - Discord.js:如果输入不是已知命令,我如何捕捉这种情况?
- c++ - CodeLite 显示不存在的错误 (wxWidgets)
- python - PLY :错过了“if”语句
- spring-boot - Maven 中依赖项的嵌套异常 - java.io.FileNotFoundException: ServerPropertiesAutoConfiguration.class
- java - JAVA - 获取最后打印文件的路径
- python-3.x - 无法在 Windows 10 中安装 argon2
- .net-core - .NET Core 3 Azure Function ILogger - 正确使用?
- aws-api-gateway - 如何使用 aws-sdk-apigateway 创建使用计划?