Home > Blockchain >  Node js Express Mongdb
Node js Express Mongdb

Time:08-19

throw new error_1.MongoAPIError(database names cannot contain the character '${invalidChars[i]}'); ^

MongoAPIError: database names cannot contain the character ' '

CodePudding user response:

I think you used the wrong quotation marks. Use `` instead of ''

CodePudding user response:

instead of trying to insert the variable values like '${invalidChars[i]}'
you should use Template Literals like :`${invalidChars[i]}`

  • Related