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

BaseHub exports not found #360

Open
Rikozi opened this issue Dec 15, 2024 · 12 comments
Open

BaseHub exports not found #360

Rikozi opened this issue Dec 15, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@Rikozi
Copy link

Rikozi commented Dec 15, 2024

Describe the bug
The installation documentation on the Next-Forge Installation Page is incomplete and unclear. There are numerous errors encountered while attempting to install Next-Forge, and the setup process is overly complicated due to the lack of detailed guidance.

@Rikozi Rikozi added the bug Something isn't working label Dec 15, 2024
@haydenbleasel
Copy link
Owner

Hi @Younestalby, thanks for the bug report! It would be handy if you could drop your Terminal log here so I can see what the errors are. Also if you can let me know your OS and Node version, that may help identify the issue also.

@Rikozi Rikozi closed this as not planned Won't fix, can't repro, duplicate, stale Dec 15, 2024
@Rikozi
Copy link
Author

Rikozi commented Dec 15, 2024

I'm Using Windows 11

Export Pump doesn't exist in target module

1 | export { Pump as Feed } from 'basehub/react-pump';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |

The export Pump was not found in module [project]/node_modules/.pnpm/basehub@7.5.28_@babel+runtime@7.24.6_@types[email protected]_enquirer@[email protected]_reac_dg3unnfihpy5trh74sikmblzsq/node_modules/basehub/react-pump.js [app-rsc] (ecmascript).
The module has no exports at all.
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.

./packages/cms/index.ts:1:1
Export basehub doesn't exist in target module

1 | import { basehub, fragmentOn } from 'basehub';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |
3 | const imageFragment = fragmentOn('BlockImage', {
4 | url: true,

The export basehub was not found in module [project]/node_modules/.pnpm/basehub@7.5.28_@babel+runtime@7.24.6_@types[email protected]_enquirer@[email protected]_reac_dg3unnfihpy5trh74sikmblzsq/node_modules/basehub/index.js [app-rsc] (ecmascript).
The module has no exports at all.
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.

./packages/cms/index.ts:1:1
Export fragmentOn doesn't exist in target module

1 | import { basehub, fragmentOn } from 'basehub';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |
3 | const imageFragment = fragmentOn('BlockImage', {
4 | url: true,

The export fragmentOn was not found in module [project]/node_modules/.pnpm/basehub@7.5.28_@babel+runtime@7.24.6_@types[email protected]_enquirer@[email protected]_reac_dg3unnfihpy5trh74sikmblzsq/node_modules/basehub/index.js [app-rsc] (ecmascript).
The module has no exports at all.
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.

⨯ ./packages/cms/components/feed.tsx:1:1
Export Pump doesn't exist in target module

1 | export { Pump as Feed } from 'basehub/react-pump';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |

The export Pump was not found in module [project]/node_modules/.pnpm/basehub@7.5.28_@babel+runtime@7.24.6_@types[email protected]_enquirer@[email protected]_reac_dg3unnfihpy5trh74sikmblzsq/node_modules/basehub/react-pump.js [app-rsc] (ecmascript).
The module has no exports at all.
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.

./packages/cms/index.ts:1:1
Export basehub doesn't exist in target module

1 | import { basehub, fragmentOn } from 'basehub';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |
3 | const imageFragment = fragmentOn('BlockImage', {
4 | url: true,

The export basehub was not found in module [project]/node_modules/.pnpm/basehub@7.5.28_@babel+runtime@7.24.6_@types[email protected]_enquirer@[email protected]_reac_dg3unnfihpy5trh74sikmblzsq/node_modules/basehub/index.js [app-rsc] (ecmascript).
The module has no exports at all.
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.

./packages/cms/index.ts:1:1
Export fragmentOn doesn't exist in target module

1 | import { basehub, fragmentOn } from 'basehub';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |
3 | const imageFragment = fragmentOn('BlockImage', {
4 | url: true,

The export fragmentOn was not found in module [project]/node_modules/.pnpm/basehub@7.5.28_@babel+runtime@7.24.6_@types[email protected]_enquirer@[email protected]_reac_dg3unnfihpy5trh74sikmblzsq/node_modules/basehub/index.js [app-rsc] (ecmascript).
The module has no exports at all.
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.

⨯ ./packages/cms/components/feed.tsx:1:1
Export Pump doesn't exist in target module

1 | export { Pump as Feed } from 'basehub/react-pump';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |

The export Pump was not found in module [project]/node_modules/.pnpm/basehub@7.5.28_@babel+runtime@7.24.6_@types[email protected]_enquirer@[email protected]_reac_dg3unnfihpy5trh74sikmblzsq/node_modules/basehub/react-pump.js [app-rsc] (ecmascript).
The module has no exports at all.
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.

./packages/cms/index.ts:1:1
Export basehub doesn't exist in target module

1 | import { basehub, fragmentOn } from 'basehub';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |
3 | const imageFragment = fragmentOn('BlockImage', {
4 | url: true,

The export basehub was not found in module [project]/node_modules/.pnpm/basehub@7.5.28_@babel+runtime@7.24.6_@types[email protected]_enquirer@[email protected]_reac_dg3unnfihpy5trh74sikmblzsq/node_modules/basehub/index.js [app-rsc] (ecmascript).
The module has no exports at all.
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.

./packages/cms/index.ts:1:1
Export fragmentOn doesn't exist in target module

1 | import { basehub, fragmentOn } from 'basehub';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |
3 | const imageFragment = fragmentOn('BlockImage', {
4 | url: true,

The export fragmentOn was not found in module [project]/node_modules/.pnpm/basehub@7.5.28_@babel+runtime@7.24.6_@types[email protected]_enquirer@[email protected]_reac_dg3unnfihpy5trh74sikmblzsq/node_modules/basehub/index.js [app-rsc] (ecmascript).
The module has no exports at all.
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.

⨯ ./packages/cms/components/feed.tsx:1:1
Export Pump doesn't exist in target module

1 | export { Pump as Feed } from 'basehub/react-pump';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |

The export Pump was not found in module [project]/node_modules/.pnpm/basehub@7.5.28_@babel+runtime@7.24.6_@types[email protected]_enquirer@[email protected]_reac_dg3unnfihpy5trh74sikmblzsq/node_modules/basehub/react-pump.js [app-rsc] (ecmascript).
The module has no exports at all.
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.

./packages/cms/index.ts:1:1
Export basehub doesn't exist in target module

1 | import { basehub, fragmentOn } from 'basehub';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |
3 | const imageFragment = fragmentOn('BlockImage', {
4 | url: true,

The export basehub was not found in module [project]/node_modules/.pnpm/basehub@7.5.28_@babel+runtime@7.24.6_@types[email protected]_enquirer@[email protected]_reac_dg3unnfihpy5trh74sikmblzsq/node_modules/basehub/index.js [app-rsc] (ecmascript).
The module has no exports at all.
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.

./packages/cms/index.ts:1:1
Export fragmentOn doesn't exist in target module

1 | import { basehub, fragmentOn } from 'basehub';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |
3 | const imageFragment = fragmentOn('BlockImage', {
4 | url: true,

The export fragmentOn was not found in module [project]/node_modules/.pnpm/basehub@7.5.28_@babel+runtime@7.24.6_@types[email protected]_enquirer@[email protected]_reac_dg3unnfihpy5trh74sikmblzsq/node_modules/basehub/index.js [app-rsc] (ecmascript).
The module has no exports at all.
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.

○ Compiling /_error ...
✓ Compiled /_error in 1576ms
GET / 500 in 4259ms
GET / 500 in 11155ms
GET / 500 in 11230ms

@Rikozi Rikozi reopened this Dec 15, 2024
@haydenbleasel
Copy link
Owner

Awesome thank you. Seems like it's all BaseHub related. Let me connect with the BaseHub team and see if we can figure it out quickly.

@haydenbleasel haydenbleasel changed the title Installation docs page is not complete BaseHub exports not found Dec 15, 2024
@julianbenegas
Copy link
Contributor

hey @Younestalby, BaseHub founder here. Did you follow the CMS guide here? if you did and it's still not working, then can you take a look in the CMS dev step and see if you see an error there?

CleanShot 2024-12-15 at 21 48 36@2x
(like here)

@Rikozi
Copy link
Author

Rikozi commented Dec 16, 2024

Hi I followed the CMS guide but the error is still present
basehub

@julianbenegas
Copy link
Contributor

Gotcha, thanks for that info @Younestalby. Can you check, in your terminal, if there's an error in the @repo/cms#dev task?

CleanShot 2024-12-15 at 21 48 36@2x
feel free to send me a screenshot of what you see here ^

@Rikozi
Copy link
Author

Rikozi commented Dec 16, 2024

there no errors

@julianbenegas
Copy link
Contributor

there no errors

Odd! Not reproing myself. Can you check if these files are present in your workspace? packages/cms/.basehub

CleanShot 2024-12-16 at 11 17 02@2x

The .basehub directory is where we place the generated SDK.

@ObaidUr-Rahmaan
Copy link

I'm seeing the same problem. I don't see that .basehub folder. It doesn't get created on repo initialisation...

Tried to manually install it but it gives me this error:

╭─ ~/Desktop/swift-pact/packages/cms │ on master !5 ─────────────────────────────── ✔ │ at 08:33:48 AM ─╮
╰─ pnpm add basehub                                                                                      ─╯
../..                                    |  WARN  `node_modules` is present. Lockfile only installation will make it out-of-date
 ERR_PNPM_FETCH_404  GET https://registry.npmjs.org/@basehub%2Ffragment: Not Found - 404

This error happened while installing a direct dependency of /Users/our-rahmaan/Desktop/swift-pact/packages/cms

@basehub/fragment is not in the npm registry, or you have no permission to fetch it.

No authorization header was set for the request.
../..                                    | Progress: resolved 31, reused 0, downloaded 0, added 0

@eersnington
Copy link

eersnington commented Dec 29, 2024

I'm seeing a similar issue with the .basehub generated folder. It happens on vercel during build times only and it's fixable if I redeploy the failed deployment.

[15:42:21.104] Running build in Washington, D.C., USA (East) – iad1
[15:42:21.244] Cloning github.com/eersnington/feedbackthing-monorepo (Branch: main, Commit: 6e08650)
[15:42:21.855] Cloning completed: 612.01ms
[15:42:43.408] Restored build cache from previous deployment (3i9XqYa6jmv5sw1c33ES7DqVRTvZ)
[15:42:43.496] Running "vercel build"
[15:42:44.127] Vercel CLI 39.2.0
[15:42:44.417] > Detected Turbo. Adjusting default settings...
[15:42:45.484] Detected `pnpm-lock.yaml` version 9 generated by [email protected]
[15:42:45.488] Running "install" command: `pnpm install`...
[15:42:46.676] Scope: all 30 workspace projects
[15:42:49.236] 
[15:42:49.423] Done in 3.8s
[15:42:49.444] Detected Next.js version: 15.1.0
[15:42:49.445] Running "turbo run build"
[15:42:49.505] 
[15:42:49.505] Attention:
[15:42:49.505] Turborepo now collects completely anonymous telemetry regarding usage.
[15:42:49.505] This information is used to shape the Turborepo roadmap and prioritize features.
[15:42:49.506] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[15:42:49.506] https://turbo.build/repo/docs/telemetry
[15:42:49.506] 
[15:42:49.609] • Packages in scope: web
[15:42:49.609] • Running build in 1 packages
[15:42:49.609] • Remote caching enabled
[15:42:49.888] @repo/database:build: cache hit, replaying logs 87b8c334b5108251
[15:42:49.888] @repo/database:build: 
[15:42:49.888] @repo/database:build: > @repo/[email protected] build /vercel/path0/packages/database
[15:42:49.888] @repo/database:build: > prisma generate --no-hints
[15:42:49.889] @repo/database:build: 
[15:42:49.889] @repo/database:build: Prisma schema loaded from prisma/schema.prisma
[15:42:49.889] @repo/database:build: 
[15:42:49.889] @repo/database:build: ✔ Generated Prisma Client (v6.0.1) to ./../../node_modules/.pnpm/@[email protected][email protected]/node_modules/@prisma/client in 220ms
[15:42:49.889] @repo/database:build: 
[15:42:49.892] @repo/cms:build: cache hit, replaying logs 2e042d0fbaeaea76
[15:42:49.892] @repo/cms:build: 
[15:42:49.892] @repo/cms:build: > @repo/[email protected] build /vercel/path0/packages/cms
[15:42:49.892] @repo/cms:build: > basehub
[15:42:49.892] @repo/cms:build: 
[15:42:49.892] @repo/cms:build: 🪄 Generating...
[15:42:49.893] @repo/cms:build: ┌────────────────────────────────────────────────┐
[15:42:49.893] @repo/cms:build: │ 🎫 SDK Version: 7.5.28                         │
[15:42:49.893] @repo/cms:build: │ 🔗 Endpoint: https://api.basehub.com/graphql   │
[15:42:49.893] @repo/cms:build: │ 🔵 Draft: disabled                             │
[15:42:49.893] @repo/cms:build: │ 📦 Output: /vercel/path0/packages/cms/.basehub │
[15:42:49.893] @repo/cms:build: │ 🔀 Ref: main (basehub branch)                  │
[15:42:49.893] @repo/cms:build: └────────────────────────────────────────────────┘
[15:42:49.894] @repo/cms:build: �[33m❯�[39m generating the client in `/vercel/path0/packages/cms/.basehub`
[15:42:49.894] @repo/cms:build: �[33m❯�[39m fetching schema from BaseHub's API
[15:42:49.894] @repo/cms:build: �[32m✔�[39m fetching schema from BaseHub's API
[15:42:49.894] @repo/cms:build: �[33m❯�[39m preparing client directory
[15:42:49.894] @repo/cms:build: �[32m✔�[39m preparing client directory
[15:42:49.894] @repo/cms:build: �[33m❯�[39m writing files
[15:42:49.894] @repo/cms:build: �[33m❯�[39m writing schema.graphql
[15:42:49.894] @repo/cms:build: �[33m❯�[39m copy runtime files
[15:42:49.894] @repo/cms:build: �[33m❯�[39m writing schema.ts
[15:42:49.894] @repo/cms:build: �[33m❯�[39m writing types map
[15:42:49.894] @repo/cms:build: �[33m❯�[39m writing index.ts
[15:42:49.894] @repo/cms:build: �[32m✔�[39m writing schema.ts
[15:42:49.894] @repo/cms:build: �[32m✔�[39m writing types map
[15:42:49.894] @repo/cms:build: �[32m✔�[39m writing index.ts
[15:42:49.894] @repo/cms:build: �[32m✔�[39m copy runtime files
[15:42:49.894] @repo/cms:build: �[32m✔�[39m writing schema.graphql
[15:42:49.894] @repo/cms:build: �[32m✔�[39m writing files
[15:42:49.895] @repo/cms:build: �[32m✔�[39m generating the client in `/vercel/path0/packages/cms/.basehub`
[15:42:49.895] @repo/cms:build: �[?25h📦 Compiling to JavaScript...
[15:42:49.895] @repo/cms:build: 🪄 Generated `basehub` client in 824ms
[15:42:50.011] web:build: cache miss, executing ca86fac4046ac956
[15:42:50.531] web:build: 
[15:42:50.532] web:build: > web@ build /vercel/path0/apps/web
[15:42:50.532] web:build: > next build
[15:42:50.532] web:build: 
[15:42:59.226] web:build: (node:268) ExperimentalWarning: CommonJS module /vercel/path0/packages/env/index.ts is loading ES Module /vercel/path0/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@t3-oss/env-nextjs/dist/index.js using require().
[15:42:59.227] web:build: Support for loading ES Module in require() is an experimental feature and might change at any time
[15:42:59.227] web:build: (Use `node --trace-warnings ...` to show where the warning was created)
[15:42:59.366] web:build:    ▲ Next.js 15.1.0
[15:42:59.367] web:build:    - Experiments (use with caution):
[15:42:59.367] web:build:      · clientTraceMetadata
[15:42:59.367] web:build: 
[15:42:59.402] web:build:    Creating an optimized production build ...
[15:42:59.939] web:build: [@sentry/nextjs] The Sentry SDK has enabled source map generation for your Next.js app. If you don't want to serve Source Maps to your users, either set the `deleteSourceMapsAfterUpload` option to true, or manually delete the source maps after the build. In future Sentry SDK versions `deleteSourceMapsAfterUpload` will default to `true`. If you do not want to generate and upload sourcemaps, set the `sourcemaps.disable` option in `withSentryConfig()`.
[15:43:00.744] web:build: [@sentry/nextjs - Node.js] Warning: No auth token provided. Will not create release. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/
[15:43:00.744] web:build: [@sentry/nextjs - Node.js] Warning: No auth token provided. Will not upload source maps. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/
[15:43:00.831] web:build: [@sentry/nextjs - Node.js] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
[15:43:26.877] web:build: [@sentry/nextjs - Edge] Warning: No auth token provided. Will not create release. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/
[15:43:26.878] web:build: [@sentry/nextjs - Edge] Warning: No auth token provided. Will not upload source maps. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/
[15:43:26.926] web:build: [@sentry/nextjs - Edge] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
[15:43:29.763] web:build: <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (314kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
[15:43:30.054] web:build: Failed to compile.
[15:43:30.055] web:build: 
[15:43:30.055] web:build: ../../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected]_reac_dg3unnfihpy5trh74sikmblzsq/node_modules/basehub/index.js:1:1
[15:43:30.055] web:build: Module not found: Can't resolve '../../../../../packages/cms/.basehub/index.js'
[15:43:30.055] web:build: > 1 | export * from "../../../../../packages/cms/.basehub/index.js";
[15:43:30.055] web:build:     | ^
[15:43:30.055] web:build: 
[15:43:30.055] web:build: https://nextjs.org/docs/messages/module-not-found
[15:43:30.055] web:build: 
[15:43:30.055] web:build: Import trace for requested module:
[15:43:30.056] web:build: ../../packages/cms/index.ts
[15:43:30.056] web:build: ./app/blog/page.tsx
[15:43:30.056] web:build: 
[15:43:30.056] web:build: ../../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected]_reac_dg3unnfihpy5trh74sikmblzsq/node_modules/basehub/next-toolbar.js:1:1
[15:43:30.056] web:build: Module not found: Can't resolve '../../../../../packages/cms/.basehub/next-toolbar/index.js'
[15:43:30.056] web:build: > 1 | export * from "../../../../../packages/cms/.basehub/next-toolbar/index.js";
[15:43:30.056] web:build:     | ^
[15:43:30.056] web:build: 
[15:43:30.056] web:build: https://nextjs.org/docs/messages/module-not-found
[15:43:30.056] web:build: 
[15:43:30.056] web:build: Import trace for requested module:
[15:43:30.056] web:build: ../../packages/cms/components/toolbar.tsx
[15:43:30.056] web:build: ./app/blog/layout.tsx
[15:43:30.056] web:build: 
[15:43:30.056] web:build: ../../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected]_reac_dg3unnfihpy5trh74sikmblzsq/node_modules/basehub/react-pump.js:1:1
[15:43:30.056] web:build: Module not found: Can't resolve '../../../../../packages/cms/.basehub/react-pump/index.js'
[15:43:30.056] web:build: > 1 | export * from "../../../../../packages/cms/.basehub/react-pump/index.js";
[15:43:30.056] web:build:     | ^
[15:43:30.056] web:build: 
[15:43:30.056] web:build: https://nextjs.org/docs/messages/module-not-found
[15:43:30.056] web:build: 
[15:43:30.056] web:build: Import trace for requested module:
[15:43:30.056] web:build: ../../packages/cms/components/feed.tsx
[15:43:30.056] web:build: ./app/blog/page.tsx
[15:43:30.056] web:build: 
[15:43:30.057] web:build: 
[15:43:30.057] web:build: > Build failed because of webpack errors
[15:43:30.173] web:build:  ELIFECYCLE  Command failed with exit code 1.
[15:43:30.187] web:build: ERROR: command finished with error: command (/vercel/path0/apps/web) /pnpm9/node_modules/.bin/pnpm run build exited (1)
[15:43:30.187] web#build: command (/vercel/path0/apps/web) /pnpm9/node_modules/.bin/pnpm run build exited (1)
[15:43:30.188] 
[15:43:30.188]  WARNING  finished with warnings
[15:43:30.188] 
[15:43:30.188] Warning - the following environment variables are set on your Vercel project, but missing from "turbo.json". These variables WILL NOT be available to your application and may cause your build to fail. Learn more at https://turbo.build/repo/docs/platform-environment-variables
[15:43:30.188] 
[15:43:30.188] [warn] @repo/database#build
[15:43:30.188] [warn]   - LIVEBLOCKS_SECRET 
[15:43:30.188] [warn] @repo/cms#build
[15:43:30.188] [warn]   - LIVEBLOCKS_SECRET 
[15:43:30.188] [warn] web#build
[15:43:30.188] [warn]   - LIVEBLOCKS_SECRET 
[15:43:30.190] 
[15:43:30.190]   Tasks:    2 successful, 3 total
[15:43:30.190]  Cached:    2 cached, 3 total
[15:43:30.190]    Time:    40.677s 
[15:43:30.190] Summary:    /vercel/path0/.turbo/runs/2qtCiOfG7mUU8Q7emIsZepsSaxo.json
[15:43:30.190]  Failed:    web#build
[15:43:30.190] 
[15:43:30.197]  ERROR  run failed: command  exited (1)
[15:43:30.211] Error: Command "turbo run build" exited with 1
[15:43:30.986] 
image

@ghostsinthemachine-commits
Copy link

ghostsinthemachine-commits commented Dec 31, 2024

I had this issue and just managed to successfully build.

My 'api 'and 'app' Vercel projects were building but my 'web' app was not.

Here's what Claude suggested that worked (I started code this year so I don't have the expertise to confirm the logic of any of this - but it built!). Here's what worked:

Complete Guide: Fixing "Module Not Found" BaseHub Errors: Complete Guide to .basehub File Generation in Next.js Monorepos (Vercel Deployment)

Step 1 - Build Commands

Choose the appropriate command for your Vercel project settings:

# For web frontend with BaseHub
turbo run build --filter=@repo/cms^... --filter=web

# For app with BaseHub
turbo run build --filter=@repo/cms^... --filter=app

# For independent API
turbo run build --filter=api

-note: I left all other commands blank (see screen grab below for my settings > general > Build & Development Settings in my Vercel project dashboard for my 'web' app.

Step 2 - Required Configuration (we changed the turbo.json file before we pushed to github which triggered the vercel auto-deployment build.) Here's the one that worked:

turbo.json

{
  "$schema": "https://turbo.build/schema.json",
  "globalDependencies": ["**/.env.*local"],
  "ui": "tui",
  "tasks": {
    "build": {
      "dependsOn": ["^build", "test"],
      "outputs": [".next/**", "!.next/cache/**", ".basehub/**"],
      "env": [
        "ARCJET_KEY",
        "BASEHUB_TOKEN",
        "BETTERSTACK_API_KEY",
        "BETTERSTACK_URL",
        "BLOB_READ_WRITE_TOKEN",
        "CLERK_SECRET_KEY",
        "CLERK_WEBHOOK_SECRET",
        "DATABASE_URL",
        "FLAGS_SECRET",
        "KV_REST_API_READ_ONLY_TOKEN",
        "KV_REST_API_TOKEN",
        "KV_REST_API_URL",
        "KV_URL",
        "LIVEBLOCKS_SECRET",
        "LOGTAIL_SOURCE_TOKEN",
        "RESEND_FROM",
        "RESEND_TOKEN",
        "SENTRY_AUTH_TOKEN",
        "SENTRY_ORG",
        "SENTRY_PROJECT",
        "STRIPE_SECRET_KEY",
        "STRIPE_WEBHOOK_SECRET",
        "SVIX_TOKEN"
      ]
    },
    "@repo/cms#build": {
      "dependsOn": [],
      "outputs": [".basehub/**"],
      "env": ["BASEHUB_TOKEN"]
    },
    "web#build": {
      "dependsOn": ["@repo/cms#build"],
      "outputs": [".next/**", "!.next/cache/**"],
      "env": [
        "ARCJET_KEY",
        "BASEHUB_TOKEN",
        "BETTERSTACK_API_KEY",
        "BETTERSTACK_URL",
        "BLOB_READ_WRITE_TOKEN",
        "CLERK_SECRET_KEY",
        "CLERK_WEBHOOK_SECRET",
        "DATABASE_URL",
        "FLAGS_SECRET",
        "KV_REST_API_READ_ONLY_TOKEN",
        "KV_REST_API_TOKEN",
        "KV_REST_API_URL",
        "KV_URL",
        "LIVEBLOCKS_SECRET",
        "LOGTAIL_SOURCE_TOKEN",
        "RESEND_FROM",
        "RESEND_TOKEN",
        "SENTRY_AUTH_TOKEN",
        "SENTRY_ORG",
        "SENTRY_PROJECT",
        "STRIPE_SECRET_KEY",
        "STRIPE_WEBHOOK_SECRET",
        "SVIX_TOKEN"
      ]
    },
    "test": {
      "dependsOn": ["^test"]
    },
    "analyze": {
      "dependsOn": ["^analyze"]
    },
    "dev": {
      "cache": false,
      "persistent": true
    },
    "clean": {
      "cache": false
    },
    "//#clean": {
      "cache": false
    }
  }
}
Screenshot 2024-12-31 at 23 07 19

If issue persists:
Ensure you have added all environment variables to all three of your Vercel projects environment variables (easier to add at team level and share to three projects).
Enable them for all environments (Production/Preview/Development)

Hope this helps.

Thanks for the awesome free boilerplate it's amazing!

Happy New Year!

@bozobit
Copy link

bozobit commented Jan 3, 2025

Hi @ghostsinthemachine-commits, I had exactly the same issue (it would build from the Vercel console, but error out when initiated by a git push) and the fix you posted worked for me! Thanks! FYI, I'm running node 20.18.1 on Linux Mint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants