Pkg: socket.io 404 in nestjs

Created on 20 May 2019  路  5Comments  路  Source: vercel/pkg

Hello
i build https://github.com/nestjs/nest/tree/master/sample/02-gateways in pkg, i connected socket.io throws 404 error in html , but it could connected when npm start in command , how could i resolve this?

Thanks.

Most helpful comment

I resolved this same issue by adding the @nestjs/websockets module folder to pkg's assets via package.json.

"pkg": {
    "assets": [
      "node_modules/@nestjs/websockets/**/*"
    ]
  }

All 5 comments

I resolved this same issue by adding the @nestjs/websockets module folder to pkg's assets via package.json.

"pkg": {
    "assets": [
      "node_modules/@nestjs/websockets/**/*"
    ]
  }

I am having the same issue, the above fix doesn't work for me

@DanStory It works, Thanks.

@GuanglongDu How did you fix that issue in your case? Doesn't work for me if I simply put the assets statement in the package.json

EDIT: I figured it out. You need to put all the config into your package.json file to make it work. Is there a way to provide the assets via cli param?

@DanStory Thanks. You saved me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

asaf050 picture asaf050  路  3Comments

serzhiio picture serzhiio  路  3Comments

Admiral-Enigma picture Admiral-Enigma  路  3Comments

ydubois-fr picture ydubois-fr  路  4Comments

erikd picture erikd  路  3Comments