You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
adapter-node is configured to build into a sibling folder (../no-external-test-prod) to simulate copying the data to the server, when you run npm run build.
Logs
PS ...\no-external-test> npm run build
>[email protected] build
> vite build
Omitting environment variable "COMMONPROGRAMFILES(X86)" from $env/static/private as it is not a valid identifier
Omitting environment variable "PROGRAMFILES(X86)" from $env/static/private as it is not a valid identifier
vite v3.0.5 building for production...
✓ 14 modules transformed.
.svelte-kit/output/client/manifest.json 1.22 KiB
.svelte-kit/output/client/_app/immutable/layout.svelte-add7c5d7.js 0.53 KiB / gzip: 0.35 KiB
.svelte-kit/output/client/_app/immutable/error.svelte-a71bdff9.js 1.56 KiB / gzip: 0.75 KiB
.svelte-kit/output/client/_app/immutable/pages/index.svelte-b1b150f9.js 1.33 KiB / gzip: 0.72 KiB
.svelte-kit/output/client/_app/immutable/chunks/index-03969575.js 6.85 KiB / gzip: 2.80 KiB
.svelte-kit/output/client/_app/immutable/start-638c390d.js 24.04 KiB / gzip: 9.05 KiB
vite v3.0.5 building SSR bundle for production...
✓ 49 modules transformed.
Generated an empty chunk: "hooks"
.svelte-kit/output/server/manifest.json 1.25 KiB
.svelte-kit/output/server/index.js 78.04 KiB
.svelte-kit/output/server/entries/endpoints/index.ts.js 114.25 KiB
.svelte-kit/output/server/entries/fallbacks/layout.svelte.js 0.25 KiB
.svelte-kit/output/server/entries/fallbacks/error.svelte.js 0.74 KiB
.svelte-kit/output/server/entries/pages/index.svelte.js 0.79 KiB
.svelte-kit/output/server/_app/immutable/chunks/index-3e01a4ca.js 2.61 KiB
.svelte-kit/output/server/_app/immutable/chunks/hooks-bced8853.js 0.00 KiB
Run npm run preview to preview your production build locally.
> Using @sveltejs/adapter-node
✔ done
PS ...\no-external-test> cp .\package.json ..\no-external-test-prod\
PS ...\no-external-test> node ..\no-external-test-prod\
Listening on 0.0.0.0:3000
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'context' imported from ...\no-external-test-prod\server\entries\endpoints\index.ts.js
at new NodeError (node:internal/errors:387:5)
at packageResolve (node:internal/modules/esm/resolve:909:9)
at moduleResolve (node:internal/modules/esm/resolve:958:20)
at defaultResolve (node:internal/modules/esm/resolve:1173:11)
at nextResolve (node:internal/modules/esm/loader:173:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:852:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:439:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
at link (node:internal/modules/esm/module_job:75:36)
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
As per @benmccann's advice in #5849 I'm providing repo to show that
ssr.noExternal
fails in some cases and creates a broken built.Building and running the provided repo results in the following error:
Reproduction
The repo can be pulled from here: https://github.com/tylkomat/no-external-test.
While I was talking about prisma in the previous discussion, this was easier to setup.
adapter-node
is configured to build into a sibling folder (../no-external-test-prod
) to simulate copying the data to the server, when you runnpm run build
.Logs
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: