-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
@parcel/transformer-css: Could not resolve module #9100
Comments
Same error for me building with Github Actions, also with Parcel 2.9.2.
|
This indicates that your package manager (eg npm) is not installing the |
It is a transitive dependency of |
When executing From my build dev:
|
This is strange because |
I wasn't even aware. I went back to look at my git history for package.json, and it looks like I added @parcel/css as a devDependency when I upgraded Parcel from 2.7.0 to 2.8.3 back in Feb 2023. Unfortunately, I also upgrade quite a few other package at the same time, so not 100% what made me include the @parcel/css dep. I am running the following devDependencies at the moment, are there any other parcel deps that I have include that is not actually neccesary to include directly like this? Maybe I just need to fix my deps.
|
I removed I was able to resolve the issue though, by adding |
It is a caret range so with a fresh install npm should pull in the latest. You probably had an outdated lockfile entry for it that prevented the newer version from being installed. |
Thanks, I will give it a try in my test-branch and see removing my lock file and reinstalling dependencies also gives me a newer lightningcss 👍 |
I can confirm that removing my package-lock.json and reinstalling all dependencies allowed it to pull down v1.21.0 which does not have this problem. Not sure why v1.19.0 has suddenly stopped working though. |
Maybe someone can help me with my sourcefile bug, i'm so confused that no one can help and give me some response - #9099 |
My team came across this same issue. We are building a React component library and it seemed to appear after we upgraded to React 18, though I don't know if that has anything to do with it. In our case, we are using...
One of these dependencies installed Installing |
I am running into the same issue today with Parcel 2.9.3, and forcing lightningcss to either 1.21.0 or 1.21.5 doesn't resolve it. Curiously, I can build the project just fine on my Mac; it's only Github's automation (running an Ubuntu 22.04.3 VM) where it fails. Here's the relevant subset of
As far as I can tell, all the "unmet optional dependency" warnings are simply because it's appropriately only installed the right build for this environment. I have tried blowing away |
See parcel-bundler/lightningcss#567 (comment). That suggestion worked for me with GitHub Actions 🙌 |
Today I rant into this issue with The solution was regenerating the lockfile, but care: If you don't remove rm -rf node_modules package-lock.json
npm install
git diff package-lock.json # be sure to overview the changes Side node: this may upgrade other dependencies, depending on your pinnings |
Fix error: ``` @parcel/transformer-css: Could not resolve module "/home/runner/work/react-typescript-parcel-template/react-typescript-parcel-template/node_modules/lightningcss/lightningcss.linux-x64-gnu.node" from "/home/runner/work/react-typescript-parcel-template/react-typescript-parcel-template/node_modules/lightningcss/node/index.js" ``` See parcel-bundler/parcel#9100 (comment)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. |
🐛 bug report
I'm encountering the below error when trying to build my site on Cloudflare Pages.
The build succeeds locally on my macbook pro, but fails in my build pipeline.
Some cursory googling suggests that I can perhaps fix this by upgrading parcel, but I am on latest parcel 2.9.2
🎛 Configuration (.babelrc, package.json, cli command)
🤔 Expected Behavior
The build should succeed
😯 Current Behavior
The build fails with the following error:
💁 Possible Solution
🔦 Context
💻 Code Sample
🌍 Your Environment
Here are my package.json dependencies:
The text was updated successfully, but these errors were encountered: