Description
When upgrading from ts-node 10.2.0 to 10.4.0, I'm seeing a failure running a script that executes require('ts-node').register({ transpileOnly: true })
.
This is the error I see:
@cspotcode/source-map-support tried to access source-map-support, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: source-map-support
Required by: @cspotcode/source-map-support@npm:0.7.0 (via /Users/noah/.yarn/berry/cache/@cspotcode-source-map-support-npm-0.7.0-456c3ea2ce-8.zip/node_modules/@cspotcode/source-map-support/)
Using Yarn PnP 3.1.0. In yarn pnp, any package required needs to be declared in its package.json. I've tried to understand where source-map-support is required and whether it should be listed, but I had some trouble with the source code. If we want to check for the existence of the package, throwing it in a try...catch would be ideal.