Skip to content
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

build failed with @astrojs/vercel/static #5172

Closed
1 task
berlysia opened this issue Oct 23, 2022 · 0 comments · Fixed by #5241
Closed
1 task

build failed with @astrojs/vercel/static #5172

berlysia opened this issue Oct 23, 2022 · 0 comments · Fixed by #5241

Comments

@berlysia
Copy link

What version of astro are you using?

1.5.2

Are you using an SSR adapter? If so, which one?

@astrojs/vercel/static

What package manager are you using?

npm, yarn

What operating system are you using?

WSL2(Ubuntu 22.04)

Describe the Bug

npm init astro@latest # Just the basics
cd to-generated-dir
npx astro add vercel
# edit to use /static
npm run build
> npm run build

> @example/basics@0.0.1 build
> astro build

06:37:49 PM [build] output target: server
06:37:49 PM [build] deploy adapter: @astrojs/vercel/static
06:37:49 PM [build] Collecting build info...
06:37:49 PM [build] Completed in 12ms.
06:37:49 PM [build] Building server entrypoints...
[vite]: Rollup failed to resolve import "undefined" from "@astrojs-ssr-virtual-entry".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
 error   [vite]: Rollup failed to resolve import "undefined" from "@astrojs-ssr-virtual-entry".
  This is most likely unintended because it can break your application at runtime.
  If you do want to externalize this module explicitly add it to
  `build.rollupOptions.external`
Error: [vite]: Rollup failed to resolve import "undefined" from "@astrojs-ssr-virtual-entry".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
    at onRollupWarning (file:///[snip]/sandbox-astro-vercel-static/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:45916:19)
    at onwarn (file:///[snip]/sandbox-astro-vercel-static/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:45714:13)
    at Object.onwarn (file:///[snip]/sandbox-astro-vercel-static/node_modules/rollup/dist/es/shared/rollup.js:23225:13)
    at ModuleLoader.handleResolveId (file:///[snip]/sandbox-astro-vercel-static/node_modules/rollup/dist/es/shared/rollup.js:22352:26)
    at file:///[snip]/sandbox-astro-vercel-static/node_modules/rollup/dist/es/shared/rollup.js:22313:26

I've found #4464 , but it seems different problem (and already fixed it).

Link to Minimal Reproducible Example

https://github.com/berlysia/reproducible-astrojs-vercel-static-build-failure

Participation

  • I am willing to submit a pull request for this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant