Unverified Commit da3265ad authored by Myles Borins's avatar Myles Borins
Browse files

errors: backport ERR_INVALID_PROTOCOL to v8.x

This error code originally landed in a semver-major commit and is used
by the ESM implementation. This backport includes the error message
and the documentation for the error.

I did attempt to write a test for this, but it did not seem possible
to catch an exception during import, I was also unable to execute
`node --experimental-modules` properly inside of a child_process.

I'll dig more into getting a test together, but we should backport
this fix in the mean time.

Refs: https://github.com/nodejs/node/pull/14423
Fixes: https://github.com/nodejs/node/issues/15374

PR-URL: https://github.com/nodejs/node/pull/15388


Reviewed-By: default avatarBradley Farias <bradley.meck@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 99dc1f93
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment