尝试连接到数据库时出现以下错误:
\nConex\xc3\xa3o estbabelecida com sucesso\nAcessar http://localhost:3000\nServidor executando na porta 3000\nC:\\Users\\lopes\\Desktop\\Javascript\\novo-projeto\\ExpressEWebpack\\node_modules\\pg\\lib\\sasl.js:24\n throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string')\n ^\n\nError: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string\n at Object.continueSession (C:\\Users\\lopes\\Desktop\\Javascript\\novo-projeto\\ExpressEWebpack\\node_modules\\pg\\lib\\sasl.js:24:11)\n at Client._handleAuthSASLContinue (C:\\Users\\lopes\\Desktop\\Javascript\\novo-projeto\\ExpressEWebpack\\node_modules\\pg\\lib\\client.js:257:10)\n at Connection.emit (events.js:315:20)\n at C:\\Users\\lopes\\Desktop\\Javascript\\novo-projeto\\ExpressEWebpack\\node_modules\\pg\\lib\\connection.js:114:12\n at Parser.parse (C:\\Users\\lopes\\Desktop\\Javascript\\novo-projeto\\ExpressEWebpack\\node_modules\\pg-protocol\\dist\\parser.js:40:17)\n at Socket.<anonymous> (C:\\Users\\lopes\\Desktop\\Javascript\\novo-projeto\\ExpressEWebpack\\node_modules\\pg-protocol\\dist\\index.js:11:42)\n at Socket.emit (events.js:315:20)\n at addChunk (internal/streams/readable.js:309:12)\n at readableAddChunk (internal/streams/readable.js:284:9)\n at Socket.Readable.push (internal/streams/readable.js:223:10)\n[nodemon] app crashed - waiting for file changes before starting...\nRun Code Online (Sandbox Code Playgroud)\n这是我的连接代码
\nrequire('dotenv').config();\nconst express = require('express');\nconst app = express(); \nconst { …Run Code Online (Sandbox Code Playgroud)