ng-demos
ng-demos copied to clipboard
no mondodb data in ngCodeCamper.zip
In order to run the cc-bmean app, I started by unzipping the file ngCodeCamper.zip file, modifying the dbpath property in mongodb.config and starting up mongod daemon by using the modified mongodb.config doesn't work.
Connecting to mongo server and switching to ngCodeCamper database does not show any collelction. Does the zip file have any issues or anythign specific required to be done?
I am running this on a Mac
+1
When connecting to the database directly using a mongo client, there are no databases listed, and when running the cc-beam app, the last console line is:
"!!! Failed while getting MongoDb collections; is the MongoDb server running?"
Yes, it is running, but there is nothing in the DB. Did you get this resolved?
I saw some wildtiger files in the unzipped folder and so I restarted mongod using the wildtiger option, but still there 0 collections connecting using a client and running db.collection.count().
Looks like the zip contains an empty database.
+1 Have the same problem. After starting MongoDB and listening on port 27017 (through e.g. MongoChef i can establish connection), get "!!! Failed while getting MongoDb collections; is the MongoDb server running?" error.
+1 me too, and can't find a solution.
+1
+1
+1
+1
+1
You should add following to the mongodb config file storageEngine=mmapv1
WiredTiger is a new storage engine for MongodDB which is now recommended over MMAPv1.
Worked great on Linux. Got the same errors on Windows.
It's working! thanks @smahesaniya for the solution. need to set storageEngine=mmapv1 before running the fresh extract of ngCodeCamper.zip
+1, setting storageEngine=mmapv1 solved issue on OSX as well
This didn't work for me received an error.
2016-04-14T06:52:41.964-0500 I STORAGE [initandlisten] exception in initAndListen: 28662 Cannot start server. Detected data files in /Users/username/development/ng-demos/cc-bmean/src/server/data/ngCodeCamper created by the 'wiredTiger' storage engine, but the specified storage engine was 'mmapv1'., terminating
I'm starting to think that the database needs to be setup via running scripts. I believe people are having issues with mongo/node version issues, but I'm not interested enough to care. I'll just follow the plural-site course with the non mongo version.
@JonathanAaron: as @pancasutresna wrote, you need to set that before running the fresh extract of ngCodeCamper.zip. That means if you have extracted the zip file, you should delete the extracted folder, set storageEngine=mmapv1, and re-extract the zip file.
I did as all you folks said, but get an error at starting cc-bmean server. Help, pls! err :)
GET /bower_components/angular/angular.js 200 11.944 ms - -
c:\Users\alex\WebstormProjects\AngularCleanCode\ng-demos\cc-bmean\node_modules\mongodb\lib\utils.js:98
process.nextTick(function() { throw err; });
^
TypeError: Trailer name must be a valid HTTP Token ["Content-Type:"]
at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:347:13)
. . .
Process finished with exit code 1
@aleksmaksiuta: please always have Google by your side. The first result of searching "Trailer name must be a valid HTTP Token ["Content-Type:"]" should solve your problem. Or if it's not the first result, here you are https://github.com/johnpapa/ng-demos/issues/84
Thank you @smahesaniya, setting storageEngine=mmapv1 solved the issue on OSX for me!
Having the same problem in Windows 10. The steps that i have tried:
- Installed MongoDB 3.2
- Download fresh copy of data files.
- Added storageEngine=mmapv1 to my mongodb.config file. The file is now like that:
#logpath=c:\mongodb\log\mongo.log #dbpath=C:\Projects\AngularJSPatterns\ng-demos\cc-bmean\src\server\data #rest=true #storageEngine=mmapv1
- Added mongodb the my PATH
- Run this command mongod.exe --dbpath C:\Projects\AngularJSPatterns\ng-demos\cc-bmean\src\server\data
and it said "data created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'" and [initandlisten] waiting for connections on port 27017
- When i type http://localhost:27017/ to Chrome, i get an Error: "It looks like you are trying to access MongoDB over HTTP on the native driver port."
- When i try to gulp serve-dev command in project folder, i also get an error:
!!! Failed while getting MongoDb collections; is the MongoDb server running? C:\Projects\AngularJSPatterns\ng-demos\cc-bmean\node_modules\mongodb\lib\utils.js:98 process.nextTick(function() { throw err; }); ^ Error: Unable to locate collection Persons: MongoError: Collection Persons does not exist. Currently in strict mode.
For the previous problem that i wrote above, HTTP interface deprecated since version 3.2 of mongo db https://docs.mongodb.com/ecosystem/tools/http-interfaces/
So if you are able to do, could you please update the course or mention a workaround in here. @johnpapa
This also worked for me on Windows 7. Had to add storage line to mongodb.config file, delete extracted ngCodeCamper folder, unzip it again and restart the server.
Thanks!
Please could someone describe step by step how to make this work on windows 10? I'm not getting any ... :-(
+1 I have the same problem first i installed the mongoDB from site and make it as a service running now but when try to run the configuration it give me this error: "Unable to locate collection Persons: MongoError: Collection Persons does not exist. Currently in strict mode."
Is there any solution for this issue @johnpapa
@mawadallah same problem doing Angularjs clean code course on pluralsight.
I create my own mongo database that pointing to data/ngCodeCamper directory.
Error: Unable to locate collection Persons: MongoError: Collection Persons does not exist. Currently in strict mode
I hope any solution for this issue of the @johnpapa because doesn't exist script of creation to this table.
A few of the solutions above work for some folks, but not others.
The course is not reliant on the mongodb, and I may just remove it from the course entirely since the course is about Angular and not messing with configuring mongo :)
+1 Thank you @smahesaniya Setting storageEngine=mmapv1 solved the issue on my OSX as well