Open penx opened 4 months ago
Thank you for the reproduction. We are investigating a fix for this.
@penx Can you please try again and let me know if the issue is fixed for you?
@TooTallNate unfortunately not, using remix-utils 7.6.0 and @vercel/remix 2.8.1
Apologies. We had to roll back the flag for the change that was fixing this issue. If you want to test, set the environment variable VERCEL_EDGE_FUNCTIONS_ENHANCED_RESOLVE=1
.
@TooTallNate do you know if enhanced resolve is still planned to be rolled out?
It is still planned, but some other tasks have taken priority so far. We will get to it soon. Is setting that environment variable working for you in the meantime?
@TooTallNate sorry for the delay in getting back, VERCEL_EDGE_FUNCTIONS_ENHANCED_RESOLVE=1
seems to help but when this is enabled we sometimes get an error post-build and pre-deploy so haven't been able to enable this permanently
sandbox.js:422:6610: ERROR: [plugin: vc:file-system] Expected "fakePath" to be defined
@penx Would you be able to share a reproduction of when that happens?
I am using remix-utils/client-only in a route:
https://github.com/sergiodxa/remix-utils
This errors during deployment:
ClientOnly does not import from node, it only imports from react:
https://github.com/sergiodxa/remix-utils/blob/main/src/react/client-only.tsx https://github.com/sergiodxa/remix-utils/blob/main/src/react/use-hydrated.ts
So this component should be usable on Vercel Edge and this seems to be a false positive.
Is the vercel pipeline flagging this due to the peer dependencies of remix-utils containing
@remix-run/node
?https://github.com/sergiodxa/remix-utils/blob/main/package.json
How can I deploy a route using remix-utils to the edge?
Reproduction:
https://github.com/penx/remix-utils-vercel-edge