parcel: Regressions in 2.8.3
š bug report
Upgrading parcel to 2.8.3 (from 2.8.2) caused some builds to break. Itās not clear what exactly happened, but I think everything was related to sass.
I donāt know if transformers are compatible with non-matching versions of parcel, but I didnāt try downgrading only transformer-sass.
š Configuration (.babelrc, package.json, cli command)
Not using babel.
I have a couple of local resolver plugins, only one of which I think is relevant - it aliases react to preact and is needed (AFAICT) to resolve those aliases in a monorepo where I also depend on react proper.
The only explicit parcel deps:
"@parcel/core": "2.8.3",
"@parcel/transformer-sass": "2.8.3",
"parcel": "2.8.3",
My setup builds a bunch of independent html sources using a shared parcel config.
šÆ Current Behavior
- Sass file changes donāt seem to trigger rebuilds in watch mode (when included from html via
<link>) - Some builds fail with
Error: Expected content key XXXXXXXXX to exist. I suspected that font faces withsrc: url(../relative/path.ttf)were the culprit, but I couldnāt confirm easily. Removing some of these didnāt seem to help.
I apologize, I reverted the upgrade later and donāt have an example of the original backtrace. They didnāt give me any particular clues as to what the problem was.
š Possible Solution
Downgrading all things parcel to v2.8.2 caused everything to work as expected.
š Your Environment
| Software | Version(s) |
|---|---|
| Parcel | 2.8.3 |
| Node | 16.15.1 |
| Yarn | 3.3.1 |
| Operating System | Linux |
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 5
- Comments: 17 (6 by maintainers)
I think I am encountering the exact same issue and made a very minimal sample: https://github.com/lukaw3d/parcel-bundler_two-css-from-js_and-css-from-second-css
The gist seems to be: if you import multiple CSS files from JS, only the first CSS file can import other CSS files
Perhaps. In my case, building with
--no-cacheand/or removing.parcel-cachefirst made no difference, I end up in the same place as you with anExpected content key ### to existerror.Iām having a similar issue with 2.8.3 builds failing w/ error
Expected content key ### to exist. We donāt use sass or the sass-transformer in our project though. Build/serve works fine in 2.8.2 as you stated.https://github.com/parcel-bundler/parcel/issues/6528
Iām experiencing the āError: Expected content key XXXXXXXXX to existā issue as well after upgrading from v2.7.0 to v2.8.3. If I switch back to v2.7.0, the error goes away; but⦠if I delete my package-lock.json and node_modules (and .parcel-cache) and npm install, then I get the same error using v2.7.0. So itās possible the issue was introduced earlier, but package-lock.json has been masking it.
@mellodev, you said v2.8.2 was working for you: if you remove package-lock.json and node_modules, then reinstall, does it begin to error at that version?