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

Polyfill error after 1.17.1 upgrade #6644

Closed
1 task done
brandonpittman opened this issue Jun 20, 2023 · 17 comments
Closed
1 task done

Polyfill error after 1.17.1 upgrade #6644

brandonpittman opened this issue Jun 20, 2023 · 17 comments

Comments

@brandonpittman
Copy link

brandonpittman commented Jun 20, 2023

What version of Remix are you using?

1.17.1

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

  • Yes

Steps to Reproduce

  1. Upgrade to 1.17.1
  2. Add a require in a module

Expected Behavior

Shouldn't trigger error

Actual Behavior

Triggers an error like this:

Uncaught TypeError: Cannot assign to read only property 'Z_BEST_COMPRESSION' of object '#<Object>'
    at node-modules-polyfills-commonjs:zlib (node-modules-polyfills-commonjs:zlib:6:25)

Rolling back to 1.17.0 makes the error go away.

@NavaceSystem
Copy link

Getting something similar:

No matching export in "node-modules-polyfills:querystring" for import "parse"

@omar-minka
Copy link

Getting this same error for a library which uses axios

@acidio
Copy link

acidio commented Jun 21, 2023

I'm also getting the same error after I added:

import { json } from '@remix-run/node'

export async function action({ request }: ActionArgs) {
  const formData = await request.formData()
  const submission = parse(formData, { schema })
  if (!submission.value || submission.intent !== 'submit') {
    return json(submission, { status: 400 })
  }
}

@MichaelDeBoey
Copy link
Member

This will be fixed by #6562

@omar-minka
Copy link

@MichaelDeBoey that was already merged and is on version 1.17.1, but that's the version that's having issues with zlib
Thar PR fixed crypto(For example I was having issues with createHash) but not zlib

@MichaelDeBoey MichaelDeBoey reopened this Jun 21, 2023
@markdalgleish
Copy link
Member

@brandonpittman Could you share a minimal repro?

@brandonpittman
Copy link
Author

brandonpittman commented Jun 23, 2023

@markdalgleish

I'm not sure what kind of repro I can do. It's a work system that processes brain scan images using dicom-parser. dicom-parser is the library that's using zlib under the hood.

@scottwillman
Copy link

Hey @brandonpittman, I've been battling this same issue with the same error and just tracked it down to the ObjectId import of the most recent mongodb version (5.6.0). If I downgrade to 5.5.0 it goes away and all is well again. Any chance this scenario is causing your issue as well?

@brandonpittman
Copy link
Author

@markdalgleish
Copy link
Member

I'm confident this issue is fixed due to my upstream PR: imranbarbhuiya/esbuild-plugins-node-modules-polyfill#120.

If you can get your project to resolve to esbuild-plugins-node-modules-polyfill@v1.1.0, can you let me know if it solves your issue?

@brandonpittman
Copy link
Author

If you can get your project to resolve to esbuild-plugins-node-modules-polyfill@v1.1.0, can you let me know if it solves your issue?

@markdalgleish I updated to 1.18 and 1.1.0 of the polyfills package seems to be getting resolved…and the error is gone. I think we can say this issue is solved.

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-4ef7a88-20230629 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!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-0657c16-20230630 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!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.18.1-pre.2 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!

@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2023

🤖 Hello there,

We just published version v0.0.0-nightly-7abaf9f-20230701 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!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.19.0-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!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.19.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!

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

8 participants