Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I keep getting the following message #11

Open
Astraazzuro opened this issue Jan 13, 2025 · 7 comments
Open

I keep getting the following message #11

Astraazzuro opened this issue Jan 13, 2025 · 7 comments

Comments

@Astraazzuro
Copy link

Uncaught SyntaxError: Unexpected identifier 'Riona'

git clone https://github.com/david-patrick-chuks/Riona-AI-Agent.git
git clone https://github.com/david-patrick-chuks/Riona-AI-Agent.git
^^^^^

@cameronking4
Copy link

Riona-AI-Agent % npm start

[email protected] start
tsc && node build/index.js

info: Starting Instagram agent... {"timestamp":"11:13:39 PM"}
(node:40697) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.

(Use node --trace-deprecation ... to show where the warning was created)
warn: Warning: The punycode module is deprecated. Please use a userland alternative instead. {"timestamp":"11:13:39 PM"}

info: Server is running on port 3000 {"timestamp":"11:13:39 PM"}
error: MongoDB connection error: Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://" {"stack":"MongoParseError: Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"\n at new ConnectionString (/Users/cameronking/Desktop/sideproject/Riona-AI-Agent/node_modules/mongodb-connection-string-url/lib/index.js:86:19)\n at parseOptions (/Users/cameronking/Desktop/sideproject/Riona-AI-Agent/node_modules/mongodb/lib/connection_string.js:185:17)\n at new MongoClient (/Users/cameronking/Desktop/sideproject/Riona-AI-Agent/node_modules/mongodb/lib/mongo_client.js:53:63)\n at NativeConnection.createClient (/Users/cameronking/Desktop/sideproject/Riona-AI-Agent/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:312:14)\n at NativeConnection.openUri (/Users/cameronking/Desktop/sideproject/Riona-AI-Agent/node_modules/mongoose/lib/connection.js:1016:34)\n at Mongoose.connect (/Users/cameronking/Desktop/sideproject/Riona-AI-Agent/node_modules/mongoose/lib/mongoose.js:446:15)\n at connectDB (/Users/cameronking/Desktop/sideproject/Riona-AI-Agent/build/config/db.js:11:34)\n at Object. (/Users/cameronking/Desktop/sideproject/Riona-AI-Agent/build/app.js:55:20)\n at Module._compile (node:internal/modules/cjs/loader:1566:14)\n at Object..js (node:internal/modules/cjs/loader:1718:10)","timestamp":"11:13:39 PM"}

@MarisKay
Copy link

same here

@onewilk
Copy link

onewilk commented Jan 15, 2025

Check the MONGODB_URI in the .env file.
Here is mine by the default.

MONGODB_URI=mongodb://127.0.0.1:27017

@A-Barkho
Copy link

Hey you need to use the following format:
MONGODB_URI= mongodb://db-username:db-password@localhost:27017

this works for me ;)

@HendrikWi
Copy link

mongodb

After adding this line I get the following error:

MongoDB connection error: connect ECONNREFUSED ::1:27017, connect ECONNREFUSED 127.0.0.1:27017 {"errorLabelSet":{},"reason":{"commonWireVersion":0,"compatible":true,"heartbeatFrequencyMS":10000,"localThresholdMS":15,"logicalSessionTimeoutMinutes":null,"maxElectionId":null,"maxSetVersion":null,"servers":{"localhost:27017":{"$clusterTime":null,"address":"localhost:27017","arbiters":[],"electionId":null,"error":{"beforeHandshake":false,"errorLabelSet":{}},"hosts":[],"iscryptd":false,"lastUpdateTime":71702342,"lastWriteDate":0,"logicalSessionTimeoutMinutes":null,"maxBsonObjectSize":null,"maxMessageSizeBytes":null,"maxWireVersion":0,"maxWriteBatchSize":null,"me":null,"minRoundTripTime":0,"minWireVersion":0,"passives":[],"primary":null,"roundTripTime":-1,"setName":null,"setVersion":null,"tags":{},"topologyVersion":null,"type":"Unknown"}},"setName":null,"stale":false,"type":"Unknown"},"stack":"MongooseServerSelectionError: connect ECONNREFUSED ::1:27017, connect ECONNREFUSED 127.0.0.1:27017\n at _handleConnectionErrors (C:\Development\Riona-AI-Agent\node_modules\mongoose\lib\connection.js:1154:11)\n at NativeConnection.openUri (C:\Development\Riona-AI-Agent\node_modules\mongoose\lib\connection.js:1085:11)\n at async connectDB (C:\Development\Riona-AI-Agent\build\config\db.js:11:9)","timestamp":"9:15:17 AM"}

Do you perhaps know what else needs to be done?

@HendrikWi
Copy link

mongodb

After adding this line I get the following error:

MongoDB connection error: connect ECONNREFUSED ::1:27017, connect ECONNREFUSED 127.0.0.1:27017 {"errorLabelSet":{},"reason":{"commonWireVersion":0,"compatible":true,"heartbeatFrequencyMS":10000,"localThresholdMS":15,"logicalSessionTimeoutMinutes":null,"maxElectionId":null,"maxSetVersion":null,"servers":{"localhost:27017":{"$clusterTime":null,"address":"localhost:27017","arbiters":[],"electionId":null,"error":{"beforeHandshake":false,"errorLabelSet":{}},"hosts":[],"iscryptd":false,"lastUpdateTime":71702342,"lastWriteDate":0,"logicalSessionTimeoutMinutes":null,"maxBsonObjectSize":null,"maxMessageSizeBytes":null,"maxWireVersion":0,"maxWriteBatchSize":null,"me":null,"minRoundTripTime":0,"minWireVersion":0,"passives":[],"primary":null,"roundTripTime":-1,"setName":null,"setVersion":null,"tags":{},"topologyVersion":null,"type":"Unknown"}},"setName":null,"stale":false,"type":"Unknown"},"stack":"MongooseServerSelectionError: connect ECONNREFUSED ::1:27017, connect ECONNREFUSED 127.0.0.1:27017\n at _handleConnectionErrors (C:\Development\Riona-AI-Agent\node_modules\mongoose\lib\connection.js:1154:11)\n at NativeConnection.openUri (C:\Development\Riona-AI-Agent\node_modules\mongoose\lib\connection.js:1085:11)\n at async connectDB (C:\Development\Riona-AI-Agent\build\config\db.js:11:9)","timestamp":"9:15:17 AM"}

Do you perhaps know what else needs to be done?

Ok, so the solution here is to update your .env file monogodb to the following:

MONGODB_URI= mongodb://db-username:[email protected]:27017

@Rene8ade
Copy link

Rene8ade commented Feb 14, 2025

I pasted this in to my env file: MONGODB_URI= mongodb://db-username:[email protected]:27017

Then I got this on terminal: info: Starting Instagram agent... {"timestamp":"11:18:33 AM"}
info: Server is running on port 3000 {"timestamp":"11:18:33 AM"}
error: MongoDB connection error: Authentication failed. {"code":18,"codeName":"AuthenticationFailed","connectionGeneration":0,"errorResponse":{"code":18,"codeName":"AuthenticationFailed","errmsg":"Authentication failed.","ok":0},"ok":0,"stack":"MongoServerError: Authentication failed.\n at Connection.sendCommand (C:\Users\brand\Riona-AI-Agent\node_modules\mongodb\lib\cmap\connection.js:296:27)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Connection.command (C:\Users\brand\Riona-AI-Agent\node_modules\mongodb\lib\cmap\connection.js:323:26)\n at async executeScram (C:\Users\brand\Riona-AI-Agent\node_modules\mongodb\lib\cmap\auth\scram.js:79:22)\n at async ScramSHA256.auth (C:\Users\brand\Riona-AI-Agent\node_modules\mongodb\lib\cmap\auth\scram.js:39:16)\n at async performInitialHandshake (C:\Users\brand\Riona-AI-Agent\node_modules\mongodb\lib\cmap\connect.js:104:13)\n at async connect (C:\Users\brand\Riona-AI-Agent\node_modules\mongodb\lib\cmap\connect.js:24:9)","timestamp":"11:18:33 AM"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants