hazel icon indicating copy to clipboard operation
hazel copied to clipboard

vercel dev must not recursively invoke itself.

Open TrofinSorin opened this issue 3 years ago • 6 comments

Hello, i've deployed a hazel server for autoupdating electron app.

But i get this error when i try to start the server locally.

vercel dev must not recursively invoke itself. Check the Development Command in the Project Settings or the dev script in package.json

TrofinSorin avatar Sep 19 '22 22:09 TrofinSorin

I'm getting this as well, I got a bit further but added a new "start" task in package json scripts.

  "scripts": {
    "start": "micro",
    "dev": "npx vercel dev",
    "test": "xo && jest",
    "precommit": "lint-staged"
  },

You can start the server by running npm run start but I run into other issues when hitting any route.

mikekberg avatar Sep 26 '22 20:09 mikekberg

I got it running locally using micro-dev which is the suggested way to run micro in development.

"dev": "micro-dev ./lib/server.js",

You also need to add the required environment variables. I used dotenv and created a .env file in the root with:

ACCOUNT=<your-account>
REPOSITORY=<your-repo>
TOKEN=<token-if-private>
URL=http://localhost:3000

and added require('dotenv').config() at the top of /lib/index.js

Angusross111 avatar Oct 06 '22 22:10 Angusross111

I also have this issue in a plain regular React Vite app, with the following script:

"dev": "vercel dev"

I have the same error when running vercel dev from the command line.

I'm not sure what's recursive about it. Is the vercel cli trying to run the dev script? And why? Of course it can be fixed with using a different name for the script, but it bothers me.

"vercel-dev": "vercel dev"

user72356 avatar Oct 27 '22 21:10 user72356

Also running into this issue

ianrtracey avatar Feb 27 '23 02:02 ianrtracey

Guys, please check this as it is a feature.

https://vercel.com/docs/errors/error-list#recursive-invocation-of-commands

jjalonso avatar Nov 01 '23 16:11 jjalonso

We're using vc dev, e.g.

"dev": "vc dev -A vercel.local.json --listen 8000"

antoinerousseau avatar Mar 12 '24 19:03 antoinerousseau