s2 is not a function on pnpx wrangler deploy
I'm running
pnpx wrangler deploy
with the following wrangler.toml
to deploy a Nuxt 3 application from Windows 11.
Everything was working perfectly fine yesterday. I haven't found anything on google, in this discord, or as a Github issue.
Wrangler.toml:
Error:
2 Replies
Narrowed it down to a single commit..
If I do:
import { parseISO, formatDistanceToNowStrict } from "date-fns";
it fails, but
import { parseISO, formatDistanceToNowStrict } from "date-fns/esm";
(date-fns/esm vs date-fns)
works....For anyone else who gets this..
https://github.com/date-fns/date-fns/issues/1781
GitHub
Node.js ESM support · Issue #1781 · date-fns/date-fns
Unfortunately, Node.js didn't add support for "module" field that is supported by bundlers such as webpack, and introduced their own resolve logic. To add Node.js ESM support instead ...