Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vercel dev not working #11535

Open
kaushiksahu18 opened this issue May 3, 2024 · 2 comments
Open

vercel dev not working #11535

kaushiksahu18 opened this issue May 3, 2024 · 2 comments

Comments

@kaushiksahu18
Copy link

I want to deploy my express app to vercel todoappdb
i have watched many videos and docs, and come up with idea to add vercel.json file showing blow

{
  "version": 2,
  "builds": [{ "src": "index.js", "use": "@vercel/node" }],
  "routes": [{ "src": "/(.*)", "dest": "/" }]
}

after this i did vercel login and then vercel dev, (source:vercel docs).
BUT ITS NOT WORKING
console log

$ vercel dev
(node:28702) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Vercel CLI 34.1.7
? Set up and develop “~/forvs/todoDBforkkta”? yes
? Which scope should contain your project? kaushiksahu18's projects
? Link to existing project? no
? What’s your project’s name? todoappdb1
? In which directory is your code located? ./
🔗  Linked to kaushiksahu18s-projects/todoappdb1 (created .vercel)
> Ready! Available at http://localhost:3000
Server running on port 5000
file:///home/kaushiksahu18/.local/share/pnpm/global/5/.pnpm/@vercel+node@3.0.28/node_modules/@vercel/node/dist/dev-server.mjs:1027
    return listener(req, res);
           ^

TypeError: listener is not a function
    at Server.<anonymous> (file:///home/kaushiksahu18/.local/share/pnpm/global/5/.pnpm/@vercel+node@3.0.28/node_modules/@vercel/node/dist/dev-server.mjs:1027:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v21.7.3

NOW WHAT I SHOULD DO?
IS THERE ANY EASY WAY TO DEPLOY EXPRESS APP EITHER ON VERCEL OR .......

@sidddev7
Copy link

I am also facing same issue
TypeError: listener is not a function

@kaushiksahu18
Copy link
Author

I am also facing same issue

i was trying to deploy my express.js server, but now i think i only have one option, using server less i.g. cloudflare workers(provide free tiar), you can try too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants