luthraG / image-watermark

A powerful watermark library for single page images, multipage images, and pdf files based on ImageMagick for node.js
https://www.npmjs.com/package/image-watermark
MIT License
102 stars 33 forks source link

Can't resolve 'child_process' #15

Open Navyasri-Gurram opened 6 years ago

Navyasri-Gurram commented 6 years ago

Getting error as Can't resolve 'child_process'

var watermark = require('image-watermark'); watermark.embedWatermark(require("./00030.jpg") , { 'text': 'sample watermark' });

brianpilati commented 6 years ago

I am seeing the same error from an installing today.

events.js:167 throw er; // Unhandled 'error' event ^

Error: spawn identify ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:229:19) at onErrorNT (internal/child_process.js:406:16) at process._tickCallback (internal/process/next_tick.js:63:19) at Function.Module.runMain (internal/modules/cjs/loader.js:745:11) at startup (internal/bootstrap/node.js:266:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3) Emitted 'error' event at: at Process.ChildProcess._handle.onexit (internal/child_process.js:235:12) at onErrorNT (internal/child_process.js:406:16) [... lines matching original stack trace ...] at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)

@Navyasri-Gurram Any thoughts on this error?

jeremylzy commented 6 years ago

@brianpilati I have the same error,Have you solved the problem? Tks

brianpilati commented 6 years ago

@jeremylzy You need to install ImageMagick.

nibiru2O12 commented 5 years ago

having the same problem.. installed this https://www.npmjs.com/package/imagemagick but still throwing error.

bruceleong commented 5 years ago

Has this error been fixed? I have tried using the API instructions with no luck and the same error as above.

NIVJAIN commented 5 years ago

No, not yet fixed, i created a python script.

Sent from my iPhone6+

With Best Regards Mit freundlichen Grüßen und Liebe Grüße aus Singapur🇩🇪

On 29 Mar 2019, at 7:28 AM, Bruce Leong notifications@github.com wrote:

Has this error been fixed? I have tried using the API instructions with no luck and the same error as above.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thremute the threadad.

sushantpaudel commented 5 years ago

This problem is caused because your system could not find a command identify. This problem can be resolved by installing ImageMagick from the official site and go to this answer if you are still facing the same error after the installation.

The problem of this error is, there is really little information in the error message to tell you where the root cause is. I found a suitable answer to get to the root cause of the error from here. And, read the comments for further information and get a more brief cause of the error.

zmarwa commented 5 years ago

@NIVJAIN could you please paste your python code ! Thks!