This is a known problem in the newest version of Parcel.
The solution of this problem was to revert back to version 1.12.3
, or by updating to the version 2 of Parcel. You can do the first solution by:
npm uninstall parcel-bundler
npm i --save-dev parcel-bundler@1.12.3
The second solution could be done like this:
npm i --save-dev parcel@next
You might have to refactor your code a bit to prevent breaking changes if you decided to use the nightly version of Parcel. Check more about how to migrate to Parcel v2 / nightly here.
Catch up with that issue here.
Update #1: 28/05/2021
It seems that Parcel team has been working on a fix, as of the time of writing (28/05/2021). While I have not personally checked if the update has worked properly or not, this answer is still very much a viable and feasible solution.