Skip to content
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

error: n is not defined (Has possible fix solution attached) #15

Closed
ArbestNew opened this issue Mar 30, 2019 · 5 comments
Closed

error: n is not defined (Has possible fix solution attached) #15

ArbestNew opened this issue Mar 30, 2019 · 5 comments

Comments

@ArbestNew
Copy link

After building a production version of my VUE app, the error throw "n is not defined". (No issue in dev version)

This issue only happens in .min.js:
/dist/vue-image-upload-resize.umd.min.js

You can locate the error function by searching the following pattern (that's where I found the issue)
{var i="";for(n=t;n<t+r;n++)i+=String.f

I simply add let before the variable and the issue solved in my case. (I tested it in my production build.)

After my edit:
{var i="";for(let n=t;n<t+r;n++)i+=String.f

Thank you again for your work, and I do appreciate it. Please consider my case and fix it, cause I believe it is a good VUE image uploader which is very helpful for so many possible projects.

@ArbestNew
Copy link
Author

The version I mentioned early is 2.0.4.

@svale
Copy link
Member

svale commented Apr 19, 2019

Hi @ArbestNew, thank you for noting this issue and for the proposed fix. And thank you for your patiences with my late reply.

I believe the problem is inherited from the exif-js dependency, which it seems is no longer actively maintained (se e.g exif-js/exif-js#50). I probably need to update a fork that better handles module loading/strict mode.

Until then I'll leave this issue open.

@memic84
Copy link

memic84 commented Jun 12, 2019

Is there a other workaround, other than chaning the minified output file?

@svale
Copy link
Member

svale commented Aug 17, 2019

@ArbestNew og @memic84 thank your for you patience on this one.

I'll be publishing av new version 2.1.0 with the exif utility inlined this weekend. That should resolve this issue.

Thanks!

@svale
Copy link
Member

svale commented Aug 18, 2019

Resolved with 2.1.0 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants