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

i got a node error when i use this modules #3

Open
zz373609 opened this issue Jan 30, 2018 · 8 comments
Open

i got a node error when i use this modules #3

zz373609 opened this issue Jan 30, 2018 · 8 comments
Labels

Comments

@zz373609
Copy link

screen shot 2018-01-30 at 2 37 01 pm
how this should work
should I add node modules on webpack or?

@preco21
Copy link
Owner

preco21 commented Jan 30, 2018

Well, I'm not expected this module can be used in browsers. So basically it only be available for Node.js environment at the moment (I'm working on new version which supports it). However, it's essentially relying on jimp module for image processing, I guess the issue you filed might related to upstream.

I don't have enough information to figure out what went wrong in your code. Can I see some code snippets?

@zz373609
Copy link
Author

What I have done is that I just import this module, I guess the problem is that fail to use Webpack somehow, but I do not know how to configure this Webpack make it use the buffer, my Webpack is like 3.0+

@preco21
Copy link
Owner

preco21 commented Jan 31, 2018

I got the issue from the upstream: jimp-dev/jimp#280

@preco21
Copy link
Owner

preco21 commented Jan 31, 2018

Basically, when you build a library that targets to browser environments with webpack, the webpack will automatically inject Buffer polyfill to the bundle to make it work in other platform other than node.

But it seems to be they are using browserify instead of webpack. Although, I suppose it should handle Buffer injection anyway.

So in the meantime, I'm going to revert previous version of jimp so that merge-img will still work until this issue addressed.

@preco21
Copy link
Owner

preco21 commented Jan 31, 2018

Oops, closed by mistake. Reopening.

@preco21 preco21 reopened this Jan 31, 2018
@zz373609
Copy link
Author

Thanks, I will just try it now once you use the previous jimp

@zz373609
Copy link
Author

did you just update on npm or not yet

@preco21
Copy link
Owner

preco21 commented Jan 31, 2018

Sorry, I just struggled with np, Here give it a try: v2.1.2.

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

No branches or pull requests

2 participants