-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't exec prettier #1010
Comments
Added some extra notes from our investigation in Onivim in onivim/oni2#945 looks like esy generates a pnp.js file from here: Line 944 in cee0381
...and in that spot, it 'monkey-patches' the Module._findPath module resolution logic. It seems that, in Node 13+, that paths can now be null. Looking at the original implementation: https://github.com/nodejs/node/blob/efce655c0f1671d0e86b5c89092ac93db983ef94/lib/internal/modules/cjs/loader.js#L617 it seems it checks if the path is absolute, if it is, it just uses [''] for paths- otherwise it validates it is non-null and an array. Seems like we might need to bring some of that logic over to esy. Seems specific to Node v13+ - @CrossR confirmed that Node 12 works, but Node 13 does not. |
Hardly scientific or thorough, but blindly copying that logic over into my generated |
Related to #930 |
Actual behavior:
When I try to exec Prettier, I get the following error:
Expected behavior:
We should be able to exec it.
Additional steps to reproduce:
The text was updated successfully, but these errors were encountered: