Skip to content

[BUG] Windows compiler not recognizing the commands in the postinstall script #388

@Aviral-Ranjan

Description

@Aviral-Ranjan

Description

I was trying to locally run the frontend on my windows machine, then upon running pnpm install in my powershell terminal, it shows this error:

Image

Quick Fix:-

In the /apps/api/package.json directory, inside the scripts object :
Do these changes.

Change this: "postinstall": "[ -f prisma/schema.prisma ] && prisma generate || true"

To this: "postinstall": "prisma generate"

Result:- Changing this will make it work on all the Operating Systems.

I can raise a PR myself also for this.

Steps to Reproduce

To reproduce this bug:-
In the /apps/web directory, run the "pnpm install" command inside the powershell terminal or the cmd on a windows machine.

Expected Behavior

Expected it to build the frontend.

Actual Behavior

Instead it shows some error.

Version

No response

Environment

Windows system using powershell terminal

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions