baler
baler copied to clipboard
Baler is not working anymore: TypeError: Cannot redefine property: default
Hey @DrewML
We're using Baler for projects, but since today we're unable to deploy because Baler gives an error. Please see error code below. We don't see any new commits in Baler and the commits that worked before in our projects are failing now as well (no code changes). We've been able to reproduce this in our development environment as well. Changing "default" to another name seems to resolve the issue.
baler stderr: /chroot/home/nextmp/.config/yarn/global/node_modules/@magento/baler/dist/createBundleFromDeps.js:14
Object.defineProperty(o, "default", { enumerable: true, value: v });
^
TypeError: Cannot redefine property: default
at Function.defineProperty (<anonymous>)
at __setModuleDefault (/chroot/home/nextmp/.config/yarn/global/node_modules/@magento/baler/dist/createBundleFromDeps.js:14:12)
at __importStar (/chroot/home/nextmp/.config/yarn/global/node_modules/@magento/baler/dist/createBundleFromDeps.js:22:5)
at Object.<anonymous> (/chroot/home/nextmp/.config/yarn/global/node_modules/@magento/baler/src/createBundleFromDeps.ts:18:1)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
from /var/lib/gems/2.5.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
@dverkade looks to be since the 3.9.2 release of typescript as it's the module loading which is the issue - I've downgraded to v3.8.3 to work around this for now if that helps you until a solution is found here.
I think it's a problem with installing via yarn too as there's no yarn.lock present to prevent that upgrade.
@adamj88, thanks, this resolved our issue for now. Looking forward to the change that enables compatibility with typescript 3.9.2.