node-react-aws-dynamodb-boilerplate icon indicating copy to clipboard operation
node-react-aws-dynamodb-boilerplate copied to clipboard

Run into Mongoose error while implementing on windows 10.

Open gusdoe opened this issue 7 years ago • 1 comments

Hi Keith,

I know you developed this boilerplate code on Mac OS. However, do you have any clue why I have following error when I trying to install? Is it because of path letter difference between '/' vs ''?

......\node-react-aws-dynamodb-boilerplate\node_modules\mongoose\lib\connection.js:428 throw new MongooseError('The uri parameter to openUri() must be a ' + ^ MongooseError: The uri parameter to openUri() must be a string, got "undefined". Make sure the first parameter to mongoose.connect() or mongoose.createConnection() is a string. at new MongooseError (c:\src\node-react-aws-dynamodb-boilerplate\node_modules\mongoose\lib\error\mongooseError.js:13:11) at NativeConnection.Connection.openUri (c:\src\node-react-aws-dynamodb-boilerplate\node_modules\mongoose\lib\connection.js:428:11) at Mongoose.connect (c:\src\node-react-aws-dynamodb-boilerplate\node_modules\mongoose\lib\index.js:262:15) at Object. (c:\src\node-react-aws-dynamodb-boilerplate\server\server.js:21:10) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:191:16) at bootstrap_node.js:612:3

gusdoe avatar Nov 22 '18 05:11 gusdoe

@gusdoe Looks like the boilerplate expects a db_dev or db to be configured in the config.js.

server.js:

// Set up Mongoose
mongoose.connect(isDev ? config.db_dev : config.db);

Would be nice to include some placeholders there.

jasonsturges avatar May 12 '21 18:05 jasonsturges