Nest: The argument 'id' must be a non-empty string. Received ''

Created on 14 May 2018  路  6Comments  路  Source: nestjs/nest

I'm submitting a...


[X] Regression
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

When I run my app, it doesn't work.

Expected behavior

It should start

What is the motivation / use case for changing the behavior?

Init app
image

Environment


[System Information]
OS Version : Windows 7
NodeJS Version : v10.0.0
NPM Version : 6.0.0
[Nest Information]
microservices version : 5.0.0
websockets version : 5.0.0
mongoose version : 4.0.0
passport version : 1.0.10
swagger version : 2.0.0
testing version : 5.0.0
common version : 5.0.0
core version : 5.0.0





"dependencies": {
"@nestjs/common": "^5.0.0",
"@nestjs/core": "^5.0.0",
"@nestjs/microservices": "^5.0.0",
"@nestjs/mongoose": "^4.0.0",
"@nestjs/passport": "^1.0.10",
"@nestjs/swagger": "^2.0.0",
"@nestjs/testing": "^5.0.0",
"@nestjs/websockets": "^5.0.0",
"bcrypt": "^2.0.1",
"fastify-formbody": "^2.0.0",
"jsonwebtoken": "^8.2.1",
"mongoose": "^5.1.0",
"passport": "^0.4.0",
"passport-http-bearer": "^1.0.1",
"passport-jwt": "^4.0.0",
"reflect-metadata": "^0.1.12",
"rxjs": "^6.0.0",
"typescript": "^2.6.2"
},

Most helpful comment

I got this error because I had overlooked that I was not properly importing the module:

const expressJwt = require('')

oops...

All 6 comments

I reinstall node_modules and it works again

@menme95 I am experiencing the same issue..
My nodemon.json file is configured as follows

{
  "watch": [
    "src"
  ],
  "ext": "ts",
  "ignore": [
    "src/**/*.spec.ts"
  ],
  "exec": "ts-node -r --inspect=5000 tsconfig-paths/register src/main.ts"
}

Do you have any additional info?

I get this error only when I run it for debugging in "vs code"

I get this error only when I run it for debugging in "vs code"

Me too

I got this error because I had overlooked that I was not properly importing the module:

const expressJwt = require('')

oops...

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VRspace4 picture VRspace4  路  3Comments

anyx picture anyx  路  3Comments

rafal-rudnicki picture rafal-rudnicki  路  3Comments

cojack picture cojack  路  3Comments

thohoh picture thohoh  路  3Comments