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
[🐛 Bug]: Re-fetch the Vercel package from the network every time when update in --watch
mode
#240
Comments
@noobnooc thank you so very much for the issue, I must admit that I haven't used
this seems a valid proposed solution, I'd be totally on board 🙂 Since you ticked that you would like to help with the bug, would you like to have a go at it? 😃 |
I found that there is a |
Awesome! thank you so very much! 🙂 If you need anything or want to discuss possible approaches please just ask 😄 |
Hello there. I opened a PR #247 to fix this issue. I have tested it separately in environments with and without Vercel installed, and there are no issues. Please take a look when you have time, and let me know if you encounter any problems. |
next-on-pages environment related information
System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000
CPU: (10) arm64 Apple M1 Max
Memory: 32 GB
Shell: /bin/zsh
Binaries:
Node: 19.6.1
Yarn: 3.3.0
npm: 9.4.0
pnpm: N/A
Package Manager Used: yarn (berry)
Relevant Packages:
@cloudflare/next-on-pages: 0.10.1
vercel: N/A
next: N/A
Description
I have installed
@cloudflare/next-on-pages
,vercel
andwrangler
to the dependencies of my project. I added"cf:watch": "yarn next-on-pages --watch"
to thescripts
ofpackage.json
.Then when I run
yarn cf:watch
in terminal, every time I update my code,@cloudflare/next-on-pages
will refetch thevercel
package from network, so the action is soooo slow.After checked the source code in this repo, I found you are using
yarn dlx
to execute the vercel building inyarn (berry)
environment. The code innext-on-pages/src/buildApplication/buildVercelOutput.ts#84
is following:Since the
yarn dlx
will refetch the package from npm registry every time, so it do in--watch
mode. And I tested with to delete the line...(pkgMng === 'yarn (berry)' ? ['dlx'] : []),
in above code, and it's to do things correctly without refetching.Maybe you guys could consider run vercel building with
yarn vercel
directly when thevercel
package is added to the project dependencies?Reproduction
No response
Pages Deployment Method
None
Pages Deployment ID
No response
Additional Information
No response
Would you like to help?
The text was updated successfully, but these errors were encountered: