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

yjs throws error when using @remix-run/dev 1.16.0 #6290

Closed
1 task done
anton-g opened this issue May 3, 2023 · 7 comments
Closed
1 task done

yjs throws error when using @remix-run/dev 1.16.0 #6290

anton-g opened this issue May 3, 2023 · 7 comments

Comments

@anton-g
Copy link

anton-g commented May 3, 2023

What version of Remix are you using?

1.16.0

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

Version 1.16.0 of @remix-run/dev breaks yjs. It works fine for 1.15.0 of @remix-run/dev.

I didn't know how to add a test for this specific case, but here's a CodeSandbox with reproduction: https://codesandbox.io/p/github/anton-g/remix-yjs-error/main

Steps to recreate from scratch:

➜ npx create-remix@latest
? Where would you like to create your app? ./yjs-example
? What type of app do you want to create? Just the basics
? Where do you want to deploy? Choose Remix App Server if you're unsure; it's easy to change deployment
targets. Remix App Server
? TypeScript or JavaScript? TypeScript
? Do you want me to run `npm install`? Yes

➜ npm i yjs

Add the following to the top of _index.js:

import * as Y from 'yjs'

const ydoc = new Y.Doc()

Run the app (npm run dev) and refresh the page.

Expected Behavior

New yjs Doc created successfully on page load.

Actual Behavior

Client crashes with error:

caught TypeError: Cannot read properties of undefined (reading 'isTTY')
    at environment.js:125:30
@pcattori
Copy link
Contributor

pcattori commented May 3, 2023

@anton-g what future flags do you have enabled in remix.config.js?

@pcattori
Copy link
Contributor

pcattori commented May 3, 2023

Might be related to #6259

@anton-g
Copy link
Author

anton-g commented May 7, 2023

@anton-g what future flags do you have enabled in remix.config.js?

Just the defaults from create-remix:

  future: {
    v2_errorBoundary: true,
    v2_meta: true,
    v2_normalizeFormMethod: true,
    v2_routeConvention: true,
  },

Turning them off doesn't seem to make a difference.

@MichaelDeBoey
Copy link
Member

We just published version 1.17.1-pre.0 which includes #6562 (a possible fix). If you'd like to take it for a test run please try it out and let us know what you think!

@MichaelDeBoey
Copy link
Member

@anton-g Closing this as I can't reproduce this locally (tried with 1.15, 1.16 & 1.17) & the CodeSandbox you linked is working fine as well

@anton-g
Copy link
Author

anton-g commented Jun 12, 2023

@MichaelDeBoey Tried with 1.17.1-pre.0 and seems to be working now! Great job! 🙌

@MichaelDeBoey
Copy link
Member

@anton-g to be clear: when trying to reproduce this, it was already working in 1.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants