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

Throw error when trying to use the vercel static adapter in server mode #5241

Merged
merged 2 commits into from
Oct 28, 2022

Conversation

matthewp
Copy link
Contributor

@matthewp matthewp commented Oct 28, 2022

Changes

Testing

Tested in example project

Docs

N/A, bug fix

@matthewp matthewp requested a review from JuanM04 October 28, 2022 17:51
@changeset-bot
Copy link

changeset-bot bot commented Oct 28, 2022

🦋 Changeset detected

Latest commit: 1e0b73f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Oct 28, 2022
@matthewp matthewp merged commit 070da6a into main Oct 28, 2022
@matthewp matthewp deleted the disallow-use-of-vercel-static-on-output-server branch October 28, 2022 18:48
@astrobot-houston astrobot-houston mentioned this pull request Oct 28, 2022
@@ -22,6 +22,10 @@ export default function vercelStatic(): AstroIntegration {
'astro:config:done': ({ setAdapter, config }) => {
setAdapter(getAdapter());
_config = config;

if(config.output === 'server') {
throw new Error(`${PACKAGE_NAME} should be used with output: 'static'`);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain this? Does this mean there is Vercel adapter needed for static build?

I am experimenting with Vercel without adapters and Im having trouble with "command astro not found issue" which is in my dependencies.

Is this adapter meant to fix issues like this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: integration Related to any renderer integration (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build failed with @astrojs/vercel/static
3 participants