vercel / hazel

Lightweight update server for Electron apps
https://twitter.com/notquiteleo/status/893547786255421441
MIT License
2.9k stars 382 forks source link

vercel dev must not recursively invoke itself. #152

Open TrofinSorin opened 2 years ago

TrofinSorin commented 2 years ago

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

mikekberg commented 2 years ago

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.

Angusross111 commented 2 years ago

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

user72356 commented 1 year ago

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"

ianrtracey commented 1 year ago

Also running into this issue

jjalonso commented 11 months ago

Guys, please check this as it is a feature.

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

antoinerousseau commented 7 months ago

We're using vc dev, e.g.

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