parcel: 2.6.1 - 2.6.2: build error @parcel/compressor-raw: Cannot read properties of undefined (reading 'on')
π bug report
After trying to update to parcel 2.6.1 and 2.6.2, when trying to build we get an error of @parcel/compressor-raw: Cannot read properties of undefined (reading 'on')
. Itβs an error that happens when packaging different types of files (from .js to .ico to image assets)). Everything works fine on parcel 2.6.0.
π Configuration (.babelrc, package.json, cli command)
Weβre using the following .parcelrc
:
{
"extends": "@parcel/config-default",
"transformers": {
"*.{js,mjs,jsx,cjs,ts,tsx}": [
"@parcel/transformer-js",
"@parcel/transformer-react-refresh-wrap"
]
}
}
π€ Expected Behavior
After updating to parcel 2.6.1 or 2.6.2, build completes succesfully.
π― Current Behavior
After updating to parcel 2.6.1 or 2.6.2, build will most of the time error with message:
Packaging index.[hash].js...
@parcel/compressor-raw: Cannot read properties of undefined (reading 'on')
On few occassions, re-running build
will complete ok.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 4
- Comments: 18 (6 by maintainers)
If itβs line 79, then https://github.com/parcel-bundler/parcel/pull/8337 hopefully fixes it.