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

dev/server-build.ts is missing isSpaMode #8497

Closed
threepointone opened this issue Jan 12, 2024 · 4 comments · Fixed by #8492
Closed

dev/server-build.ts is missing isSpaMode #8497

threepointone opened this issue Jan 12, 2024 · 4 comments · Fixed by #8492
Labels
bug Something isn't working feat:typescript

Comments

@threepointone
Copy link
Contributor

Reproduction

I'm trying to update an existing 2.4.1 project to 2.5.0, and I see a typecheck failure.
image

I think it's because in this file https://github.com/remix-run/remix/blob/main/packages/remix-dev/server-build.ts, you need to add

export const isSpaMode:boolean = undefined!;

My workaround is to rewrite my code like so:

image

System Info

System:
    OS: macOS 14.1.1
    CPU: (8) arm64 Apple M2
    Memory: 147.50 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.19.0 - ~/.volta/tools/image/node/18.19.0/bin/node
    Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
    npm: 10.2.3 - ~/.volta/tools/image/node/18.19.0/bin/npm
    pnpm: 8.6.12 - ~/.volta/bin/pnpm
    bun: 1.0.20 - ~/.bun/bin/bun
  Browsers:
    Edge: 120.0.2210.133
    Safari: 17.1

Used Package Manager

npm

Expected Behavior

Typescript shouldn't complain with a standard template/starter kit.

Actual Behavior

Oh I went into detail in the reproduction. Typechecking fails.

@threepointone
Copy link
Contributor Author

Ah, looks like there's already a fix underway at #8492. Closing this.

@brophdawg11 brophdawg11 linked a pull request Jan 12, 2024 that will close this issue
@brophdawg11 brophdawg11 added bug Something isn't working feat:typescript awaiting release This issue has been fixed and will be released soon and removed bug:unverified labels Jan 12, 2024
@brophdawg11
Copy link
Contributor

yeah the workaround mentioned above or @ts-expect-error are both fine for now until #8492 goes out next release.
there aren't any functional issues since these types of server apps aren't using spa mode

Copy link
Contributor

🤖 Hello there,

We just published version 2.5.1-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Copy link
Contributor

🤖 Hello there,

We just published version 2.5.1 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@brophdawg11 brophdawg11 removed the awaiting release This issue has been fixed and will be released soon label Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feat:typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants