Closed kev-ac closed 1 year ago
Hi @kev-ac, thanks a lot for the issue 🙂
Since you ticked the would-you-like-to-help checkbox I assume you'd be willing to try to fix it? 🙂
I can't guarantee it but I think that it's very very likely that the issue is simply that we watch some files in the app's directory that we need to ignore for the watch mode.
I had this issue with pnpm a while back and fixed it by adding some files to the watch mode ignore list (https://github.com/cloudflare/next-on-pages/pull/226). I suspect that your case is the same but there are yarn specific files that need to be added to the ignore list.
Thanks for the guidance. Will have a look at it once I get to it in the next days.
After investigation I've found that the package.json is the culprit.
When using yarn (classic) as the package manager vercel
is added as a dev dependency, resulting in a change in the package.json and therefore loop in the process.
See PR #314.
Awesome, yeah that makes total sense :sweat_smile:
thanks a lot @kev-ac :smiley:
next-on-pages environment related information
System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.5.0: Mon Apr 24 20:52:24 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64T6000 CPU: (10) arm64 Apple M1 Pro Memory: 32 GB Shell: /opt/homebrew/bin/fish Binaries: Node: 16.20.0 Yarn: 1.22.19 npm: 8.19.4 pnpm: 8.1.1 Package Manager Used: yarn (classic) Relevant Packages: @cloudflare/next-on-pages: 1.0.2 vercel: [object Promise] next: [object Promise] (13.4.2)_
Description
Using watch mode on a clean install of Next.js 13.4.2 (Created with
yarn create next-app PROJECT_NAME
results in an infinite loop.Reproduction
Create a Next.js app with
yarn create next-app PROJECT_NAME
.Answers to questions:
Pages Deployment Method
None
Pages Deployment ID
No response
Additional Information
Log:
Would you like to help?