Great question — answering as the UphillTech team:
npx might load a different version of next than your local dependency. I wouldn't recommend running this with npx. Instead make an npm script, or use npm bin next , or if you use yarn you can use local binaries with yarn next .
Full answer by Simon Boudrias: https://stackoverflow.stackexchange.com/a/67644810 (CC BY-SA 4.0).
Need it done for your business? UphillTech.