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: write EOF from ImageMagick #7

Closed
yejue opened this issue Feb 6, 2024 · 8 comments
Closed

Error: write EOF from ImageMagick #7

yejue opened this issue Feb 6, 2024 · 8 comments
Labels
bug Something isn't working resolved solution to a problem

Comments

@yejue
Copy link

yejue commented Feb 6, 2024

Ignore the error in ImageMagick.:
������ - 200

Error:
Error: write EOF from ImageMagick
\projects\middleearth_tax_new\node_modules_imagemagick-stream@4.1.1@imagemagick-stream\index.js:274
if (!this.listeners('error')) throw err;
^

TypeError: this.listeners is not a function
at Object.onerror (\projects\middleearth_tax_new\node_modules_imagemagick-stream@4.1.1@imagemagick-stream\index.js:274:16
)
at imagemagickstream.onerror (\projects\middleearth_tax_new\node_modules_pdftopic@1.0.1-alpha@pdftopic\index.js:25:17)
at Socket.emit (node:events:526:35)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Node.js v18.17.0

Process finished with exit code 1

@yejue
Copy link
Author

yejue commented Feb 6, 2024

OS: Windows 10
ImageMagick-7.1.1-Q16-HDRI

@Ilyes-El-Majouti
Copy link
Owner

Here's how to install ImageMagick on Windows:

  1. Download ImageMagick:
    Go to the ImageMagick website and download the Windows binary distribution. Choose the version that matches your system architecture (32-bit or 64-bit).

  2. Run the Installer:
    Once the download is complete, run the installer executable (.exe) file.

  3. Follow Installation Steps:
    Follow the on-screen instructions in the setup wizard. You can generally accept the default options unless you have specific preferences.

  4. Select Components:
    During installation, you may be asked to select components to install. Ensure that the "Install development headers and libraries for C and C++" option is checked if you plan to use ImageMagick with programming languages like C/C++.

  5. Choose Installation Directory:
    Choose the directory where you want to install ImageMagick. The default directory is usually fine for most users.

  6. Complete Installation:
    Once you've selected the options and installation directory, proceed with the installation process. After completion, you may be prompted to restart your computer, although this is not always necessary.

  7. Set System Path (Optional but Recommended):
    To use ImageMagick from the command line or in scripts, it's helpful to add the installation directory to your system's PATH environment variable. To do this:

    • Right-click on "This PC" or "My Computer" and select "Properties."
    • Click on "Advanced system settings" on the left-hand side.
    • In the System Properties window, click on the "Environment Variables" button.
    • In the Environment Variables window, select the "Path" variable under "System variables" and click "Edit."
    • Add the path to the ImageMagick installation directory (e.g., C:\Program Files\ImageMagick-7.0.11-Q16) to the list of paths, separated by semicolons.
    • Click "OK" to save your changes.
  8. Verify Installation:
    Open a command prompt and type magick -version to verify that ImageMagick is installed correctly. You should see information about the installed version of ImageMagick.

That's it! ImageMagick should now be successfully installed on your Windows system.

@yejue
Copy link
Author

yejue commented Feb 8, 2024

I'm sure I installed magic and verified it in the command line.

results follows:

C:\Users\Think>magick -version
Version: ImageMagick 7.1.1-27 Q16-HDRI x64 0225ac4:20240121 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Channel-masks(64-bit) Cipher DPC HDRI Modules OpenCL OpenMP(2.0)
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg jxl lcms lqr lzma openexr pangocairo png ps raqm raw rsvg tiff webp xml zip zlib
Compiler: Visual Studio 2022 (193732826)

@Ilyes-El-Majouti
Copy link
Owner

Install http://www.graphicsmagick.org/

@oaxis
Copy link

oaxis commented Feb 10, 2024

I'm getting the same error.

OS: Windows 11
Node : V16.19.0
Magick : V 7.1.1-27

Ignore the error in ImageMagick.:
Param�tre non valide - 200

Error:
Error: write EOF from ImageMagick
TypeError: this.listeners is not a function
    at Object.onerror (E:\*******\app-backend\node_modules\imagemagick-stream\index.js:274:16)
    at ImageMagick.imagemagickstream.onerror (E:\********\app-backend\node_modules\pdftopic\index.js:25:17)
    at Socket.emit (node:events:525:35)
    at Socket.emit (node:domain:489:12)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
[ERROR] 03:18:04 TypeError: this.listeners is not a function

According to Google results, it is because you spawn "convert", but on Windows "convert" is a system tool which converts FAT to NTFS.

I changed "convert" to "magick" in my local env and now I have another error.

magick: no images found for operation `-strip' at CLI arg 3 @ error/operation.c/CLIOption/5479.

So my guess is that its a problem with the magick version. If owner could recommend the Magick version he is using on Windows it would help.

@Ilyes-El-Majouti
Copy link
Owner

Thank you for solving a problem I will try with all the versions to see the most addapter for windows

@Ilyes-El-Majouti
Copy link
Owner

Install ghostscript https://www.ghostscript.com/index.html and the problem is solved

@Ilyes-El-Majouti
Copy link
Owner

It is all good ?

@Ilyes-El-Majouti Ilyes-El-Majouti pinned this issue Feb 29, 2024
@Ilyes-El-Majouti Ilyes-El-Majouti added bug Something isn't working resolved solution to a problem labels Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved solution to a problem
Projects
None yet
Development

No branches or pull requests

3 participants