Skip to content

Vercel build failing due to #536

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

Open
ewiner opened this issue Apr 25, 2025 · 0 comments
Open

Vercel build failing due to #536

ewiner opened this issue Apr 25, 2025 · 0 comments

Comments

@ewiner
Copy link

ewiner commented Apr 25, 2025

Current Behavior

Running one:build with this config:

export default {
  plugins: [
    one({
      web: {
        defaultRenderMode: "spa",
        deploy: "vercel",
      },

      deps: {
        // compile JS files as if they're JSX
        "@rn-primitives/slot": { "**/*.mjs": ["jsx"] },
        "@rn-primitives/portal": { "**/*.mjs": ["jsx"] },
        "@rn-primitives/menubar": { "**/*.mjs": ["jsx"] },
        "react-native-animatable": { "**/*.js": ["jsx"] },
      },
    }),
  ],
} satisfies UserConfig;

And I see this output:

  · [one.build] platform vercel
  · [one.build][vercel] generating serverless function for apiRoute /api/trpc/[...trpc]
  · [one.build][vercel.createSsrServerlessFunction] pageName: /api/trpc/[...trpc]
  · [one.build][vercel.createSsrServerlessFunction] detected react in depenency tree for /api/trpc/[...trpc]
[one.build][vercel.createSsrServerlessFunction] failed to generate func for /api/trpc/[...trpc] [Error: ENOENT: no such file or directory, lstat '/[my_home_dir]/node_modules/react'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'lstat',
  path: '/[my_home_dir]/eric/node_modules/react'
}

Expected Behavior

Build should succeed.

One Version

1.1.475

Platform (Web, iOS, Android)

Web

Reproduction

I'm sorry, I've moved to a different project and don't have time to build a full repro.  The bug is at https://github.com/onejs/one/blob/main/packages/one/src/vercel/build/generate/createApiServerlessFunction.ts#L27 if you aren't in a monorepo (e.g. `./` instead of `./packages/app` directory).

System Info

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

No branches or pull requests

1 participant