#there are errors using vercel adapter on NX monorepo

7 messages · Page 1 of 1 (latest)

mint nebulaBOT
#

Hi @dark turtle. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

I'm sorry to hear that you're having trouble with the Vercel adapter. There are a few known issues with the @astrojs/vercel adapter that might be causing your problem.

  1. Some complex packages like puppeteer (https://github.com/puppeteer/puppeteer) do not support bundling and therefore will not work properly with this adapter. The @astrojs/vercel adapter automatically bundles your final build output using esbuild to address this issue. If you're using such packages, you might face some difficulties. source (https://docs.astro.build/en/guides/integrations-guide/vercel#troubleshooting)

  2. There's a known bug where not all dependencies are being discovered when deploying a vanilla Astro site with markdown to Vercel using the @astrojs/vercel serverless adapter. A possible workaround for this issue is to explicitly glob those dependencies and include them in your configuration. source (https://github.com/withastro/astro/issues/6509)

import { defineConfig } from 'astro/config'

import vercel from '@astrojs/vercel/serverless'
import glob from 'glob'

// <https://astro.build/config>
export default defineConfig({
  output: 'server',
  adapter: vercel({
    includeFiles: [
      ...glob.sync('./node_modules/@astrojs/markdown-remark/**'),
      ...glob.sync('./node_modules/image-size/**'),
      ...glob.sync('./node_modules/inherits/**'),
      ...glob.sync('./node_modules/queue/**'),
    ],
  }),
})
  1. Another known bug is that building with @astrojs/vercel adapter outputs warnings. This issue is currently open and being looked into. source (https://github.com/withastro/astro/issues/7736)
#

If you're still having trouble, you can use the astro info command to report useful information about your current Astro environment. This information can be useful when opening an issue. source (https://docs.astro.build/en/reference/cli-reference#astro-info)

astro info

Lastly, if you have any suggestions or improvements, you're welcome to submit an issue or PR as this package is maintained by Astro’s Core team. source (https://docs.astro.build/en/guides/integrations-guide/vercel#contributing)

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@dark turtle kapa.ai is still learning and improving, please let us know how it did by reacting below

dark turtle
#

@mint nebula ENOENT: no such file or directory, stat ''

mint nebulaBOT
#

Let me check the knowledge base for you. One moment! :books:

#

The error ENOENT: no such file or directory typically means that the file or directory you're trying to access doesn't exist. In your case, it seems like the path /home/nestor/dos/telfin-monorepo/packages/telfin-web-app/packages/telfin-web-app doesn't exist or is not accessible.

Here are a few things you can check:

  1. Check the file or directory path: Make sure that the path you're trying to access is correct. It seems like you're trying to access the telfin-web-app directory inside another telfin-web-app directory. Is this intentional? If not, you might want to correct the path.

  2. Check your working directory: If you're running a command that relies on relative paths, make sure you're in the correct working directory.

  3. Check for typos: Ensure that the file or directory name is spelled correctly, including the correct case. File and directory names are case-sensitive on many systems.

  4. Check permissions: Make sure you have the necessary permissions to access the file or directory.

If you're still having trouble, you might want to provide more context or details about what you're trying to do. This could help in identifying the issue.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: