Closed elmor34 closed 9 years ago
Hi. The stack looks like a database permission problem, not an error with the generator itself.
Looks like you need to grant the 'read' role to your db user with the db.grantRolesToUser command. I think the dbAdmin user cannot read from db's other than the system collections by default.
See here: http://docs.mongodb.org/manual/reference/built-in-roles/#read
It would be great if you could provide some feedback if you got it running.
Please reopen this issue if any problems regarding the mongoose connections occur.
Running on MacOsx inside bitnami stack. Node version :0.12.4 npm version : 3.x Noticable error during generation :+1:
gyp: No Xcode or CLT version detected!
Error Messages
npm start
yoMaterial started server on ip 0.0.0.0 on port 9001, in development mode Database connection open Populating test and development data ...
/Volumes/work/mean304/apache2/htdocs/yoMaterial/server/api/user/user.model.js:265 throw err; ^ MongoError: not authorized for query on yoMaterial-dev.users at Function.MongoError.create (/Volumes/work/mean304/apache2/htdocs/yoMaterial/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:31:11) at queryCallback (/Volumes/work/mean304/apache2/htdocs/yoMaterial/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:170:34) at Callbacks.emit (/Volumes/work/mean304/apache2/htdocs/yoMaterial/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:94:3) at null.messageHandler (/Volumes/work/mean304/apache2/htdocs/yoMaterial/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:235:23) at Socket. (/Volumes/work/mean304/apache2/htdocs/yoMaterial/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:259:22)
at Socket.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:163:16)
at Socket.Readable.push (_stream_readable.js:126:10)
at TCP.onread (net.js:538:20)
npm ERR! Darwin 14.4.0 npm ERR! argv "/Volumes/work/mean304/nodejs/bin/.node.bin" "/Volumes/work/mean304/nodejs/bin/npm" "start" npm ERR! node v0.12.4 npm ERR! npm v2.13.1 npm ERR! code ELIFECYCLE npm ERR! yo-material@0.0.0 start:
node bin/server.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the yo-material@0.0.0 start script 'node bin/server.js'. npm ERR! This is most likely a problem with the yo-material package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node bin/server.js npm ERR! You can get their info via: npm ERR! npm owner ls yo-material npm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request: npm ERR! /Volumes/work/mean304/apache2/htdocs/yoMaterial/npm-debug.log bash-3.2$