-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
vee validate cannot be used with SSR #4339
Comments
I'll send a PR but on my Windows laptop running pnpm build script outputD:\work\projects\userquin\GitHub\userquin\vee-validate>nr build
> vee-validate-monorepo@ build D:\work\projects\userquin\GitHub\userquin\vee-validate
> node scripts/build.mjs
(node:16676) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as th
ose might change in a future version of Node.js.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:16676) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
Generating bundle for vee-validate
node:internal/errors:490
ErrorCaptureStackTrace(err);
^
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file and data are supported by the default ESM loader. On Windows, absolute paths must be val
id file:// URLs. Received protocol 'd:'
at new NodeError (node:internal/errors:399:5)
at throwIfUnsupportedURLScheme (node:internal/modules/esm/resolve:1059:11)
at defaultResolve (node:internal/modules/esm/resolve:1135:3)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ESMLoader.import (node:internal/modules/esm/loader:525:22)
at importModuleDynamically (node:internal/modules/esm/translators:110:35)
at importModuleDynamicallyCallback (node:internal/process/esm_loader:35:14)
at createConfig (file:///D:/work/projects/userquin/GitHub/userquin/vee-validate/scripts/config.mjs:38:47) {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
} Running |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I'm using vee-validate (with zod via Nuxt module) with Vuetify 3 in a Nuxt 3 layer: when generating the project (via
nuxi generate
), Nuxt will use SSR and the generation fails, there are somewindow
references.Describe the solution you'd like
Just remove
window
, for example, there are no references towindow
inthrottle
function.Describe alternatives you've considered
Apply a pnpm patch to
dist/vee-validate.esm.js
, a tedious task since we need to apply the patch every time a new version is released:package.json
patches/vee-validate@4.10.2.patch
The text was updated successfully, but these errors were encountered: