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

Issue deploying to Vercel: could not resolve chunk #5138

Closed
1 task
thomasledoux1 opened this issue Oct 21, 2022 · 6 comments · Fixed by #5175
Closed
1 task

Issue deploying to Vercel: could not resolve chunk #5138

thomasledoux1 opened this issue Oct 21, 2022 · 6 comments · Fixed by #5175

Comments

@thomasledoux1
Copy link

thomasledoux1 commented Oct 21, 2022

What version of astro are you using?

1.5.2

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

Vercel

What package manager are you using?

npm

What operating system are you using?

Mac

Describe the Bug

When deploying to Vercel, I get the following error:
vc-file-system:entry.mjs:280:267: ERROR: Could not resolve "./chunks/BlogLayout.821cbd02.mjs"
When I have a look in the output from the build process (with npm run build locally), I can see only 1 chunk is created.
Screenshot 2022-10-21 at 11 49 15
I added my Github repo here, not sure if I should create a Stackblitz instead since it seems to be closely related to the adapter?

Astro config:

import { defineConfig } from 'astro/config';
import tailwind from '@astrojs/tailwind';
import mdx from '@astrojs/mdx';
import { remarkReadingTime } from './src/utils/calculate-reading-time.mjs';
import vercel from '@astrojs/vercel/edge';

// https://astro.build/config
export default defineConfig({
  integrations: [
    tailwind({
      config: {
        applyBaseStyles: false,
      },
    }),
    mdx(),
  ],
  output: 'server',
  adapter: vercel(),
  markdown: {
    remarkPlugins: [remarkReadingTime],
    extendDefaultPlugins: true,
  },
});

When changing to @astrojs/vercel/serverless, I do get the BlogLayout chunk generated, so might be "edge" only.

Link to Minimal Reproducible Example

https://github.com/thomasledoux1/website-thomas-astro

Participation

  • I am willing to submit a pull request for this issue.
@matthewp
Copy link
Contributor

What does your functions folder look like? I think it should be in there.

@thomasledoux1
Copy link
Author

Hi @matthewp , thanks for the quick reply!
It doesn't appear in the functions folder either.
I clicked open all the folders so you can see the output here:
Screenshot 2022-10-21 at 16 02 40

@matthewp
Copy link
Contributor

Hm, static is your frontend code. So it's not happening there. Are there no other folders created when you do the build?

@thomasledoux1
Copy link
Author

No, no other folders created…

@thomasledoux1
Copy link
Author

Btw it worked before on [email protected] and @astro/[email protected], see diff:
4D7D0FD4-0658-4651-8A62-1A9DC2A04E58

@thomasledoux1
Copy link
Author

Maybe @JuanM04 has an idea about this? I see you worked on most of the changes of the adapter?

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.

2 participants