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

Cannot find module '../lightningcss.linux-x64-gnu.node' #44

Closed
jacob-orbiit opened this issue Nov 18, 2022 · 9 comments
Closed

Cannot find module '../lightningcss.linux-x64-gnu.node' #44

jacob-orbiit opened this issue Nov 18, 2022 · 9 comments

Comments

@jacob-orbiit
Copy link

jacob-orbiit commented Nov 18, 2022

An update to one of this packages' dependencies appears to have broken this package: parcel-bundler/lightningcss#335

I see in your package.json, you're locked to lightningcss@^1.16.0: https://github.com/indooorsman/esbuild-css-modules-plugin/blob/main/package.json#L31

lightningcss recently released a patch (1.16.1), which seems likely to blame: https://github.com/parcel-bundler/lightningcss/releases/tag/v1.16.1

Pinning to 1.16.0 explicitly may resolve the issue.

@indooorsman
Copy link
Owner

I can't reproduce this issue on my Mac Book, could you please provide more details about your case?
And if you want to lock version of lightningcss to 1.16.0 in your project, I think you could declare resolutions for yarn or overrides for npm

@jacob-orbiit
Copy link
Author

It looks like pinning your dep won't matter because lightningcss were themselves not pinning their dep, which was the source of the breakage. Details are in the lightningcss PR linked in my original post (specifically parcel-bundler/lightningcss#335 (comment)).

@indooorsman
Copy link
Owner

I've upgraded lightningcss to v1.17 which should have fixed your issue, please have a try with v2.6.3

@jacob-orbiit
Copy link
Author

Fix confirmed 🙌 Than you!

@jacob-orbiit
Copy link
Author

It's back (I'm on v2.7.1).

@jacob-orbiit jacob-orbiit reopened this Aug 11, 2023
@indooorsman
Copy link
Owner

indooorsman commented Aug 11, 2023 via email

@jacob-orbiit
Copy link
Author

jacob-orbiit commented Aug 15, 2023

please try v3-dev

That seems to be totally b0rked. Not getting any errors. I see the css file is generated (and looks fine), but there are no classes in the final markup, so I'm thinking the imports are broken.

@jacob-orbiit
Copy link
Author

Heads up to others: Adding the following to your package.json works around the issue (which I reported upstream parcel-bundler/lightningcss#567)

"overrides": {
  "esbuild-css-modules-plugin": {
    "lightningcss": "1.21.3"
  }
}

@indooorsman
Copy link
Owner

@jacob-orbiit I see, it seems to be a bug of npm npm/cli#4828 , please try:

rm -rf node_modules package-lock.json
npm install

@indooorsman indooorsman pinned this issue Aug 23, 2023
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