You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More specifically, the --experimental-loader flag will cause node to pick the esm loader to load bin/mocha and it does not like file without extensions (unlike the cjs loader).
Solution:
Add ".js" extension to bin/mocha which would still allow to create a symbolic link at .bin/mocha without file extension.
The text was updated successfully, but these errors were encountered:
Since --experimental-loader is still experimental and under redesign, we are not planning to add this extension to Mocha's binary for now. As a workaround you can move --experimental-loader=./lib/loader.mjs from NODE_OPTIONS to Mocha's config file .mocharc.js. Then Mocha will start a child-process with the entry point lib/cli/cli.js.
Hi mocha team!
Using the
--experimental-loader
node flag with mocha bin will cause it to crash because it has no extension.Example:
Explanation:
More specifically, the
--experimental-loader
flag will cause node to pick the esm loader to loadbin/mocha
and it does not like file without extensions (unlike the cjs loader).Solution:
Add ".js" extension to
bin/mocha
which would still allow to create a symbolic link at.bin/mocha
without file extension.The text was updated successfully, but these errors were encountered: