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

with-prisma example fails to build #9607

Open
1 task done
max-allan-cgr opened this issue Dec 12, 2024 · 0 comments
Open
1 task done

with-prisma example fails to build #9607

max-allan-cgr opened this issue Dec 12, 2024 · 0 comments
Assignees
Labels
area: examples Improvements or additions to examples kind: bug Something isn't working

Comments

@max-allan-cgr
Copy link

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

n/a

Which canary version will you have in your reproduction?

npm list turbo with-prisma@ /root/my-turborepo `-- [email protected]

Enviroment information

~/my-turborepo # turbo info
sh: turbo: not found

Did you perhaps mean:

npx turbo info
turbo 2.3.3

CLI:
   Version: 2.3.3
   Path to executable: /root/my-turborepo/node_modules/turbo-linux-arm64/bin/turbo
   Daemon status: Running
   Package manager: npm

Platform:
   Architecture: aarch64
   Operating system: linux
   WSL: false
   Available memory (MB): 7870
   Available CPU cores: 10

Environment:
   CI: None
   Terminal (TERM): xterm
   Terminal program (TERM_PROGRAM): unknown
   Terminal program version (TERM_PROGRAM_VERSION): unknown
   Shell (SHELL): unknown
   stdin: false



### Expected behavior

Successful build without error messages.

### Actual behavior

web:build:
web:build: Creating an optimized production build ...
web:build: ✓ Compiled successfully
Linting and checking validity of types .Failed to compile.
web:build:
web:build: ../../packages/database/src/client.ts:3:30
web:build: Type error: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.
web:build:
web:build: 1 | import { PrismaClient } from "@prisma/client";
web:build: 2 |
web:build: > 3 | export const prisma = global.prisma || new PrismaClient();
web:build: | ^
web:build: 4 |
web:build: 5 | if (process.env.NODE_ENV !== "production") global.prisma = prisma;
web:build: 6 |
npm error Lifecycle script build failed with error:
npm error code 1
npm error path /root/my-turborepo/apps/web
npm error workspace [email protected]
npm error location /root/my-turborepo/apps/web
npm error command failed
npm error command sh -c next build

web:build: ERROR: command finished with error: command (/root/my-turborepo/apps/web) /usr/local/bin/npm run build exited (1)
web#build: command (/root/my-turborepo/apps/web) /usr/local/bin/npm run build exited (1)

Tasks: 0 successful, 1 total
Cached: 0 cached, 1 total
Time: 5.396s
Failed: web#build

ERROR run failed: command exited (1)


### To Reproduce

docker run -it --entrypoint sh node:18-alpine
cd
npm i turbo@canary
npx create-turbo@latest --example with-prisma
cd my-turborepo

? Where would you like to create your Turborepo? ./my-turborepo
? Which package manager do you want to use? npm

cd my-turborepo
npm run build


### Additional context

Just trying to find an example other than basic that works. react-with-native-web fails as described in another ticket. with-prisma fails as described here.
@max-allan-cgr max-allan-cgr added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Dec 12, 2024
@anthonyshew anthonyshew self-assigned this Dec 12, 2024
@anthonyshew anthonyshew removed the needs: triage New issues get this label. Remove it after triage label Dec 12, 2024
@anthonyshew anthonyshew added the area: examples Improvements or additions to examples label Dec 12, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: examples Improvements or additions to examples kind: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants