-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Installing from github can create a C++/JS mismatch because of prebuilds #1250
Comments
I can't reproduce this using a local file path or a Buffer, and there's heavy usage of |
https://github.com/dragonfire535/xiao/tree/master/commands/image-edit none of the commands in this collection here that use |
No release has been made with 1046abf yet, so I assume you're installing from github? Did you rebuild the module? |
I am installing from github, and yes at first, but the prebuild installed after, and still doesn't work. |
^ Did you rebuild after pulling? There was a change in the C++ code in that commit, which requires rebuilding the module. |
It works when providing |
Ah, node-pre-gyp will fetch the latest prebuild, which in this case creates a mismatch between the JS and C++. That should be fixable from the (Heads-up, I'm going to change this issue's title to reflect that.) |
Jest re-evaluates modules, whereas `require` is only supposed to evaluate them once. Fix: make reloading lib/image.js safe. Fixes Automattic#1310 Fixes Automattic#1294 Fixes Automattic#1250
Should be fixed in |
Issue or Feature
Trying to call
loadImage
results in a TypeError (run with a Discord bot's eval command):This does not happen until 1046abf, using 5301420 works as expected.
Steps to Reproduce
Your Environment
The text was updated successfully, but these errors were encountered: