Skip to content

Fail to run db migrate-dev on Windows #3028

@nodtem66

Description

@nodtem66

This is an issue for the PR #3020

Describe the bug

Wasp generator produces invalid Windows path for MyApp/.wasp/out/sdk/dev/index.ts (16,50)

To Reproduce
Steps to reproduce the behavior:

cabal run wasp-cli -- new MyApp
  • Run db migrate-dev
cabal run wasp-cli -- db migrate-dev
  • The console will show this error:
? --- Setting up database... -----------------------------------------------------
[   Db  !] Error: P1003
[   Db  !]
[   Db  !] Database `dev.db` does not exist at `D:\src\github\wasp\waspc\examples\MyApp\.wasp\out\db\./dev.db`.
[   Db  !]
[   Db   ] Environment variables loaded from .env
[   Db   ] Prisma schema loaded from ..\db\schema.prisma
[   Db   ]
[   Db   ] ? Generated Prisma Client (v5.19.1) to .\..\..\..\node_modules\@prisma\client in 142ms
[   Db   ]
? --- Database successfully set up. ----------------------------------------------
? --- Building SDK... ------------------------------------------------------------

[  Wasp  ] dev/index.ts(16,50): error TS1002: Unterminated string literal.
? --- [Error] Your wasp project failed to compile: -------------------------------
- SDK build failed with exit code: 2
? --- [Error] Compilation of wasp project failed: --------------------------------
1 errors found

This is the content of dev/index.ts(16,50)

export function resolveProjectPath(path: string): string {
const waspProjectDirFromWebAppDir = '..\..\..\'
return joinPaths(waspProjectDirFromWebAppDir, path)
}

Environment:

  • OS: Windows 11 (Build 10.0.26100)
  • Cabal 3.12.1.0
  • Stack 3.3.1
  • HLS 2.10.0.0
  • GHC 8.10.7 (base-4.14.3.0)

PS. I'm working on this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions