Reputation: 25
I would sure be glad if someone could help me here...
Here's what info I got from Vercel log. From what I understand it seems to be some kind of parsing error? Something to do with backslashes being added/not being removed somewhere (see the %5C in the error message)?
TypeError [ERR_INVALID_MODULE_SPECIFIER]: Invalid module "/var/task/..%5C..%5C..%5Cwebsite%5C.svelte-kit%5Cvercel-tmp%5Cindex.js"
must not include encoded "/" or "\" characters imported from /opt/rust/nodejs.js
at finalizeResolution (node:internal/modules/esm/resolve:243:11)
at moduleResolve (node:internal/modules/esm/resolve:937:10)
at moduleResolveWithNodePath (node:internal/modules/esm/resolve:1161:14)
at defaultResolve (node:internal/modules/esm/resolve:1204:79)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38)
at ModuleLoader.import (node:internal/modules/esm/loader:315:34)
at defaultImportModuleDynamically (node:internal/modules/esm/utils:194:31)
at importModuleDynamicallyCallback (node:internal/modules/esm/utils:216:12) {
code: 'ERR_INVALID_MODULE_SPECIFIER'
}
Node.js process exited with exit status: 1. The logs above can help with debugging the issue.
I already have spent a day trying to figure this out, any help would be welcome. Here's what I have tried so far:
.vercel
and add it to .gitignore
(as suggested in this thread)npm update
Upvotes: 0
Views: 144
Reputation: 25
So after fiddling with this for another day I have found the issue.
The backslashes were coming from the the handler: '\\..\\..\\.svelte-kit\\vercel-tmp\\index.js
in vc-config.json
.
All of this is because of the default fn
function created in the .vercel
output build folder. Removing it and placing it in .gitignore
finally did the trick, I don't know what I did before that wasn't working.
Upvotes: 1