Closed rpl closed 3 years ago
Wow! Thank you so much for the detailed explanations.
You are probably using a node version < 14.4, which doesn't support fs.rmSync
note: fs-extra contains the methods of the regular fs
module plus some extra functions. So the change introduced by #126 only worked for node 14.4+...
I'm finalizing a PR to fix it. please stay tuned 😄
I am waiting for travis-ci to grant me open-source credits: they closed travis-ci.org
"recently" and the switch to travis-ci.com
for open-source projects requires some communications/manual approvals with their support team...
I just released v4.2.2. Please let me know if it fixes your issue.
Wow! Thank you so much for the detailed explanations.
You are probably using a node version < 14.4, which doesn't support
fs.rmSync
note: fs-extra contains the methods of the regular
fs
module plus some extra functions. So the change introduced by #126 only worked for node 14.4+...
That was it!
I use mainly the last node 12 while working on web-ext (as it is the minimum nodejs version still supported by web-ext
package).
I just released v4.2.2. Please let me know if it fixes your issue.
I just tested locally the related Renovate bot PR (mozilla/web-ext#2344) and I can confirm you that the issue is fixed by v4.2.2 :tada:
Thanks a lot! :heart:
While running web-ext unit tests locally I did notice the following error being logged when mocha did run all tests and it is exiting:
As the stack trace shows the error seems to be related to the changes introduced in #126 and released on npm as part of firefox-profile@4.2.1.
Based on a very quick look I think that the exception is actually expected, because
fs
is actually set to the"fs-extra"
here:and
rmSync
doesn't seem to be part of the API exposed by "fs-extra" npm package (where it seems that onlyremoveSync
is actually available), unlike the native nodejs"fs"
module which does actually have anrmSync
method with that signature.Looking more closely to the fs-extra removeSync function (which was also what that method used to call before #126), it seems that it should be already calling fs.rmSync internally on nodejs version where it is actually available:
And so it seems that rolling back to the previous implementation (the one already being calling fs-extra removeSync) may be actually a reasonable fix for this issue and should still remove that directory as the new version was meant to ensure.