Revert "feat(parcel_sourcemap_node): upgrade to napi-rs v2" #91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverts #85
This appears to have introduced several issues:
On Windows (and possibly some Linux distros also??), the process randomly crashes during Parcel builds. See parcel-bundler/parcel#7578, parcel-bundler/parcel#7590, parcel-bundler/parcel#7598, parcel-bundler/parcel#7603. We believe this to be caused by the source map upgrade, which was released separately from Parcel 2.2.1. Subsequent to this, issues began appearing.
Personally, I have not been able to reproduce it on any of my machines, but @mischnic verified that reverting the sourcemap package to 2.0.0 fixed it for him. I'm not totally sure what the underlying issue is, but it seems to be related to worker threads. Many reports in the above issues confirm that running with
PARCEL_WORKER_BACKEND=process
works around the issue.cc. @Brooooooklyn. I see you commented on nodejs/node#37673 and on avajs/ava#2926 (comment) and subsequently disabled worker threads on the napi tests in napi-rs/napi-rs#1004. This seems related to the error we are seeing. Perhaps the issue is somewhere in napi-rs itself? I'm not sure...
I'm going to revert this for now while we investigate the above issues.