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

Running on an Intel Mac, Parcel Fails with "Illegal Hardware Instruction" #10083

Open
stevematney opened this issue Feb 4, 2025 · 4 comments

Comments

@stevematney
Copy link

🐛 bug report

I'm not sure if it's something to do with my code, configuration, or dependencies, but when trying to run parcel on an Intel mac, I get a failure with "illegal hardware instruction". On a fresh, very simple project, everything runs fine, and even on my more complex project, everything works in v2.8. v2.9 has a segfault, and the "illegal hardware instruction" error shows up in 2.10.0.

🎛 Configuration (.babelrc, package.json, cli command)

The relevant portion of my package.json is

  "targets": {
    "bff-frontend": {
      "source": [
        "src/index.html"
      ],
      "distDir": "./dist"
    },
    "bff-web-components": {
      "source": [
        "src/web-components/New-Record/NewRecordCreation.js"
      ],
      "distDir": "./dist/member-info/web-components"
    }
  },

🤔 Expected Behavior

Everything should work as normal.

😯 Current Behavior

Parcel fails with "illegal hardware instruction". I have tried to nail down exactly what is causing this, but the interplay between native code and Parcel's js is not something I'm comfortable traversing, and I have not been able to find the source of the error. (I could use some help on this, if you have any advice!)

🔦 Context

All the context is above. I think probably the most complicated thing I'm trying to do is to build two separate bundles, but that doesn't seem too wild.

🌍 Your Environment

Software Version(s)
Parcel 2.10.0—latest
Node v22.13.1 (latest LTS)
npm/Yarn npm
Operating System MacOS 15.3 (Intel)
@devongovett
Copy link
Member

Going to need a complete reproduction in order to debug this

@stevematney
Copy link
Author

stevematney commented Feb 4, 2025

Here's the minimum I could come up with (plus prettier). It seems that there is some kind of dependency conflict with WTW-IM/es-components. The code that parcel is building is not actually importing that dependency, but it works if the dependency is uninstalled. This is the component library we build and use internally, so it should be relatively easy for us to update it as soon as we know what the issue is.
https://github.com/stevematney/parcel-illegal-hardware-instruction

As I said in the original description, I don't know how to actually run down the source of the error. Even with verbose logging, the output doesn't make clear where this blows up.

Thanks for your help!

@stevematney
Copy link
Author

Just a note on this: I had a thought that it might be something to do with types, so I switched to using transformer-typescript-tsc, but still ran into the same issue.

@stevematney
Copy link
Author

It seems that there is some kind of dependency conflict with WTW-IM/es-components...

I was able to narrow down that the issue is actually in @types/styled-components. I updated the reproduction repo with that dependency and removed the es-components dependency.

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

No branches or pull requests

2 participants