Bit
Server Action Invalid URL
Deployed solidstart in a lambda and GET requests to pages work. However when I make a POST request via actions I see it does everything correctly on the server side (logs a message) the response on the client is:
I have no clue how to resolve this.
;0x000002f2;
((self.$R = self.$R || {})["server-fn:0"] = [],
($R => $R[0] = Object.assign(new TypeError("Invalid URL"), {
stack: "TypeError: Invalid URL\n at new URL (node:internal/url:797:36)\n at j$2 (file:///var/task/server/chunks/runtime.mjs:6850:7705)\n at ke$2 (file:///var/task/server/chunks/runtime.mjs:6850:6433)\n at async _callHandler (file:///var/task/server/chunks/runtime.mjs:6272:16)\n at async file:///var/task/server/chunks/runtime.mjs:3002:19\n at async Object.callAsync (file:///var/task/server/chunks/runtime.mjs:5386:16)\n at async toNodeHandle (file:///var/task/server/chunks/runtime.mjs:3273:7)\n at async Runtime.handler (file:///var/task/server/chunks/runtime.mjs:8052:13)",
code: "ERR_INVALID_URL",
input: "null"
}))($R["server-fn:0"]))
;0x000002f2;
((self.$R = self.$R || {})["server-fn:0"] = [],
($R => $R[0] = Object.assign(new TypeError("Invalid URL"), {
stack: "TypeError: Invalid URL\n at new URL (node:internal/url:797:36)\n at j$2 (file:///var/task/server/chunks/runtime.mjs:6850:7705)\n at ke$2 (file:///var/task/server/chunks/runtime.mjs:6850:6433)\n at async _callHandler (file:///var/task/server/chunks/runtime.mjs:6272:16)\n at async file:///var/task/server/chunks/runtime.mjs:3002:19\n at async Object.callAsync (file:///var/task/server/chunks/runtime.mjs:5386:16)\n at async toNodeHandle (file:///var/task/server/chunks/runtime.mjs:3273:7)\n at async Runtime.handler (file:///var/task/server/chunks/runtime.mjs:8052:13)",
code: "ERR_INVALID_URL",
input: "null"
}))($R["server-fn:0"]))
3 replies
How to set URL for static assets?
Trying to have static files served from S3.
import { defineConfig } from "@solidjs/start/config";
export default defineConfig({
server: {
preset: "aws_lambda",
serveStatic: false,
output: { dir: 'dist' },
}
});
import { defineConfig } from "@solidjs/start/config";
export default defineConfig({
server: {
preset: "aws_lambda",
serveStatic: false,
output: { dir: 'dist' },
}
});
1 replies
npm run build fails if outDir is changed
import { defineConfig } from "@solidjs/start/config";
export default defineConfig({
vite: {
build: {
outDir: "dist"
},
},
server: {
preset: "aws-lambda",
}
});
import { defineConfig } from "@solidjs/start/config";
export default defineConfig({
vite: {
build: {
outDir: "dist"
},
},
server: {
preset: "aws-lambda",
}
});
> build
> vinxi build
vinxi v0.3.11
⚙ Building your app...
📦 Compiling ssr router...
vinxi building router ssr in http mode
vite v5.3.1 building SSR bundle for production...
✓ 49 modules transformed.
dist/.vite/manifest.json 1.72 kB
dist/assets/index-7whypOeP.css 0.31 kB
dist/assets/ssr-CSUIEcYF.css 0.38 kB
dist/assets/HttpStatusCode-DH8IeaZe.js 0.28 kB
dist/about.js 0.29 kB
dist/_...404_.js 0.52 kB
dist/index.js 0.62 kB
dist/assets/index-BhCdQPVl.js 2.74 kB
dist/ssr.js 24.93 kB
✓ built in 344ms
✔ build done 12:26:02 AM
📦 Compiling client router...
vinxi building router client in client mode
vite v5.3.1 building for production...
virtual:#vinxi/handler/client (1:118): "default" is not exported by "src/entry-client.tsx", imported by "virtual:#vinxi/handler/client".
✓ 56 modules transformed.
dist/server-functions-manifest.json 0.03 kB │ gzip: 0.04 kB
dist/.vite/manifest.json 1.64 kB │ gzip: 0.40 kB
dist/assets/index-7whypOeP.css 0.31 kB │ gzip: 0.22 kB
dist/assets/client-CSUIEcYF.css 0.38 kB │ gzip: 0.27 kB
dist/assets/HttpStatusCode-DjTx85av.js 0.03 kB │ gzip: 0.05 kB
dist/assets/about-D9a10H4Q.js 0.27 kB │ gzip: 0.22 kB
dist/assets/_...404_-BZfb9gVQ.js 0.52 kB │ gzip: 0.37 kB
dist/assets/index-DdD6Dmru.js 0.73 kB │ gzip: 0.45 kB
dist/assets/client-CxHr6IfA.js 21.69 kB │ gzip: 8.69 kB
dist/assets/index-BhR3EnB2.js 23.91 kB │ gzip: 9.25 kB
✓ built in 289ms
✔ build done 12:26:02 AM
📦 Compiling server-fns router...
vinxi building router server-fns in http mode
ERROR ENOENT: no such file or directory, open '/Users/urf/Repositories/solidstart-starter/lambda/.vinxi/build/client/_build/server-functions-manifest.json' 12:26:02 AM
at readFileSync (node:fs:448:20)
at config (node_modules/@vinxi/server-functions/server.js:49:5)
at runConfigHook (node_modules/vite/dist/node/chunks/dep-BcXSligG.js:66942:25)
at async resolveConfig (node_modules/vite/dist/node/chunks/dep-BcXSligG.js:66393:12)
at async Module.build (node_modules/vite/dist/node/chunks/dep-BcXSligG.js:65459:18)
at async createViteBuild (node_modules/vinxi/lib/build.js:321:17)
at async createRouterBuild (node_modules/vinxi/lib/build.js:438:2)
at async node_modules/vinxi/lib/build.js:59:5
at async createBuild (node_modules/vinxi/lib/build.js:58:4)
at async Object.run (node_modules/vinxi/bin/cli.mjs:227:5)
at async runCommand (node_modules/citty/dist/index.mjs:316:16)
at async runCommand (node_modules/citty/dist/index.mjs:307:11)
at async runMain (node_modules/citty/dist/index.mjs:445:7)
ERROR ENOENT: no such file or directory, open '/Users/urf/Repositories/solidstart-starter/lambda/.vinxi/build/client/_build/server-functions-manifest.json'
> build
> vinxi build
vinxi v0.3.11
⚙ Building your app...
📦 Compiling ssr router...
vinxi building router ssr in http mode
vite v5.3.1 building SSR bundle for production...
✓ 49 modules transformed.
dist/.vite/manifest.json 1.72 kB
dist/assets/index-7whypOeP.css 0.31 kB
dist/assets/ssr-CSUIEcYF.css 0.38 kB
dist/assets/HttpStatusCode-DH8IeaZe.js 0.28 kB
dist/about.js 0.29 kB
dist/_...404_.js 0.52 kB
dist/index.js 0.62 kB
dist/assets/index-BhCdQPVl.js 2.74 kB
dist/ssr.js 24.93 kB
✓ built in 344ms
✔ build done 12:26:02 AM
📦 Compiling client router...
vinxi building router client in client mode
vite v5.3.1 building for production...
virtual:#vinxi/handler/client (1:118): "default" is not exported by "src/entry-client.tsx", imported by "virtual:#vinxi/handler/client".
✓ 56 modules transformed.
dist/server-functions-manifest.json 0.03 kB │ gzip: 0.04 kB
dist/.vite/manifest.json 1.64 kB │ gzip: 0.40 kB
dist/assets/index-7whypOeP.css 0.31 kB │ gzip: 0.22 kB
dist/assets/client-CSUIEcYF.css 0.38 kB │ gzip: 0.27 kB
dist/assets/HttpStatusCode-DjTx85av.js 0.03 kB │ gzip: 0.05 kB
dist/assets/about-D9a10H4Q.js 0.27 kB │ gzip: 0.22 kB
dist/assets/_...404_-BZfb9gVQ.js 0.52 kB │ gzip: 0.37 kB
dist/assets/index-DdD6Dmru.js 0.73 kB │ gzip: 0.45 kB
dist/assets/client-CxHr6IfA.js 21.69 kB │ gzip: 8.69 kB
dist/assets/index-BhR3EnB2.js 23.91 kB │ gzip: 9.25 kB
✓ built in 289ms
✔ build done 12:26:02 AM
📦 Compiling server-fns router...
vinxi building router server-fns in http mode
ERROR ENOENT: no such file or directory, open '/Users/urf/Repositories/solidstart-starter/lambda/.vinxi/build/client/_build/server-functions-manifest.json' 12:26:02 AM
at readFileSync (node:fs:448:20)
at config (node_modules/@vinxi/server-functions/server.js:49:5)
at runConfigHook (node_modules/vite/dist/node/chunks/dep-BcXSligG.js:66942:25)
at async resolveConfig (node_modules/vite/dist/node/chunks/dep-BcXSligG.js:66393:12)
at async Module.build (node_modules/vite/dist/node/chunks/dep-BcXSligG.js:65459:18)
at async createViteBuild (node_modules/vinxi/lib/build.js:321:17)
at async createRouterBuild (node_modules/vinxi/lib/build.js:438:2)
at async node_modules/vinxi/lib/build.js:59:5
at async createBuild (node_modules/vinxi/lib/build.js:58:4)
at async Object.run (node_modules/vinxi/bin/cli.mjs:227:5)
at async runCommand (node_modules/citty/dist/index.mjs:316:16)
at async runCommand (node_modules/citty/dist/index.mjs:307:11)
at async runMain (node_modules/citty/dist/index.mjs:445:7)
ERROR ENOENT: no such file or directory, open '/Users/urf/Repositories/solidstart-starter/lambda/.vinxi/build/client/_build/server-functions-manifest.json'
9 replies