A2 - database names cannot contain the character '.'

367 views
Skip to first unread message

Fotis Paraskevopoulos

unread,
Sep 8, 2016, 1:20:31 PM9/8/16
to apostr...@googlegroups.com
Hello All,

We are starting a couple of A2 project, so I went ahead an reviewed the steps necessary to get up and running by following the tutorials.

Specifically 



In the steps outlined there is no mention of the database setup, and by following the steps I get stuck right after the first “node app.js”. I created the project using the “apostrophe” cli command.


Here is my info

$ apostrophe --version
0.1.4

$ npm --version
2.14.12

$ node --version
v4.3.0


$ export PORT=3005; node app.js

[project_root]/node_modules/apostrophe/node_modules/mongodb/lib/db.js:1763
    if(databaseName.indexOf(invalidChars[i]) != -1) throw MongoError.create({message: "database names cannot contain the character '" + invalidChars[i] + "'", driver:true});
                                                    ^
MongoError: database names cannot contain the character '.'
    at Function.MongoError.create ([project_root]/node_modules/apostrophe/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:31:11)
    at validateDatabaseName ([project_root]/node_modules/apostrophe/node_modules/mongodb/lib/db.js:1763:70)
    at new Db ([project_root]/node_modules/apostrophe/node_modules/mongodb/lib/db.js:150:3)
    at createServer ([project_root]/node_modules/apostrophe/node_modules/mongodb/lib/mongo_client.js:199:3)
    at connect ([project_root]/node_modules/apostrophe/node_modules/mongodb/lib/mongo_client.js:324:12)
    at Function.MongoClient.connect ([project_root]/node_modules/apostrophe/node_modules/mongodb/lib/mongo_client.js:114:3)
    at self.connectToMongo ([project_root]/node_modules/apostrophe/lib/modules/apostrophe-db/index.js:68:32)
    at [project_root]/node_modules/apostrophe/node_modules/async/lib/async.js:718:13
    at iterate ([project_root]/node_modules/apostrophe/node_modules/async/lib/async.js:262:13)
    at async.forEachOfSeries.async.eachOfSeries ([project_root]/node_modules/apostrophe/node_modules/async/lib/async.js:281:9)


I also tried creating a “data” directory and copying local.example.js => local.js

Any help would be much appreciated.

Best,
Fotis

Tom Boutell

unread,
Sep 8, 2016, 1:23:02 PM9/8/16
to apostr...@googlegroups.com
Hi Fotis,

I'm thinking you have a "." in your "shortName" setting.

We will document that this is not a good idea. Letters, digits,
hyphens, underscores. We prefer hyphens, but that's us.
> --
> You received this message because you are subscribed to the Google Groups
> "apostrophenow" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to apostropheno...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--


THOMAS BOUTELL, SUPPORT LEAD
P'UNK AVENUE | (215) 755-1330 | punkave.com

Tom Boutell

unread,
Sep 8, 2016, 1:24:47 PM9/8/16
to apostr...@googlegroups.com
Your shortname = your argument to apostrophe's command line app generator.

Fotis Paraskevopoulos

unread,
Sep 12, 2016, 5:16:16 AM9/12/16
to apostr...@googlegroups.com
OK Tom,

Its working now


>> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
>
>
> THOMAS BOUTELL, SUPPORT LEAD
> P'UNK AVENUE | (215) 755-1330  |  punkave.com



--


THOMAS BOUTELL, SUPPORT LEAD
P'UNK AVENUE | (215) 755-1330  |  punkave.com

--
You received this message because you are subscribed to the Google Groups "apostrophenow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apostrophenow+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages