lukehaas / RunJS

RunJS is a JavaScript playground for macOS, Windows and Linux. Write code with instant feedback and access to Node.js and browser APIs.
https://runjs.app
2k stars 43 forks source link

A package without `main` field in `package.json` cannot be loaded #618

Closed kapooostin closed 1 month ago

kapooostin commented 3 months ago

I stumbled upon the problem with a package @humanfs/node. It uses modern exports field instead of main in package.json.

And RunJS fails to load it:

Error: No "exports" main defined in /Users/USER/Library/Application Support/runjs/node_modules/@humanfs/node/package.json
lukehaas commented 3 months ago

This will be fixed in the next release 👍

lukehaas commented 2 months ago

@kapooostin this looks like it's working now in the latest release. Version 2.12.0.