首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Windows中的Wiki.js安装

Windows中的Wiki.js安装
EN

Stack Overflow用户
提问于 2020-10-22 06:46:22
回答 3查看 2.7K关注 0票数 3

我正试图在windows 10本地主机上安装到Wiki.js。在执行节点服务器时,我收到以下错误

代码语言:javascript
复制
(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.

我有以下内容:NotVersionv12.16.1 npm版本6.13.4 MySQL Ver 15.1远端10.4.11-MariaDB,for Win64 (AMD64),源代码修订7c2c420b70b19cc02b5281127205e876f3919dad

任何帮助都是非常感谢的。

EN

回答 3

Stack Overflow用户

发布于 2021-03-16 11:12:54

访问数据库是密码问题。

at Object.init (/home/kamla/wiki/server/core/db.js:35:37)

如果不希望为默认根用户分配密码,我建议您创建一个具有密码的新用户。请按照本指南获得MySQL:

https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql-fr

对于另一个DBMS,您可以遵循相同的过程。然后在config.yml中重新进行配置。

当您在没有密码的情况下保留pass:行时,您将得到以下错误:

2021-03-16T10:43:26.617Z主错误:数据库初始化错误:用户'root'@'localhost‘的访问被拒绝(使用密码:是)

票数 1
EN

Stack Overflow用户

发布于 2022-02-03 18:20:00

您需要编写config.yml文件(db: type:mysql)。你可能把它写成"postgres“了。

票数 0
EN

Stack Overflow用户

发布于 2022-01-21 09:10:01

你好,我解决了这个问题,我只是在我的数据库中输入一个密码,并在配置文件中报告它,但是在安装的最后一步,我遇到了另一个问题,(我使用mySQL服务器和Apache服务器),我有这个错误。

代码语言:javascript
复制
 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'
}
票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64476714

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档