-
Notifications
You must be signed in to change notification settings - Fork 87
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
Uncaught TypeError: Cannot read property 'getSync' of undefined #53
Comments
The |
However, if our build system happens to read the |
it still shows the err... |
delete |
@wind4gis I originally wrote this code directly in es6. cancerberoSgx came along and added in type script, tests and npm support. From what I understand es5 is not working for commonjs. @Axure wrote a PR to address this issue, however it breaks the tests. I reran the tests today to validate they are in fact still failing. @wind4gis you are more then welcome to adopt @Axure's PR and resubmit a forked version that doesn't break the tests I will assure you the library does work, it has been used to save over 2500 hours of artists' time at https://knicknic.github.io/croppy You can view the entirety of the source code for in that page (not minified) or at https://github.com/KnicKnic/croppy |
I also get this error, any steps to fix it? |
I have done something like this now and it works like a charm, a bit hacky though:
|
I have also experienced this issue, and hacked around it by commenting out lines 78 and 79. The offending lines (corrected):
The commenting out vs removing I believe the problem may be because of a library issue. Perhaps the older versions of the library require Another option could be how the code is injected into the application. I am using a combination of Laravel Mix (WebPack) and TypeScript to compile everything (and when working) produce a minified production build. It could be that one or both of these get rid of the |
I'm importing this package into a react app, and encountering this problem. Deleting the |
I'm not familiar with the React build process, but you may be able to alias "stacktrace-js" to your own file, then use that to point wherever you want. This also has the advantage of not having the code try to look for the other .js and .wasm files inside of webpack. Another option, is I noticed that the source .ts files in this repo don't have that problem, so you could try pulling this down and compiling it from scratch. Either the npm package needs to be re-compiled or if there's something strange going on with the build process resulting in this error. |
We got @Lagily's solution working, and then we found that we could use |
@jaredscheib @KnicKnic Is using 1.1.0 safe? Are there any security concerns with using an older version of the module? Edit: Ah I can't use it anyway without re-writing a lot of typescript. |
@JohnForster I can't vouch for it in the way it sounds like you're asking, but I don't see anything in the changelog that indicates that there have been any security vulnerabilities that have been patched in the two releases since. My team and I thought to try 1.1.0 because it's the version being used i n the CodeSandbox demo example given in the README for the project: https://codesandbox.io/s/wasm-imagemagick-basic-demo-y00u2. You could also try 1.2.0 and see if that works? Or, as @EmperorArthur mentioned above, you could just compile this repo from source, and it may work then: #53 (comment). Good luck! |
My solution was to use patch-package to edit that line after installing dependencies. Worked really well. THanks anyway @jaredscheib |
1.1.0 is file, now with respect to this bug, I would love if someone could fix it and not regress existing code. (which why I have not merged Axure's patch) |
There are a few security alerts that are raised for this project by a github bot.... I should start merging some of them in, however since I use this project on a completely static website I am not too concerned about users hacking themselves. |
success after removing
.default
on line 78The text was updated successfully, but these errors were encountered: