question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Module build failed: Error: dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib

See original GitHub issue

full error:

ERROR in ./src/images/bg.jpg
Module build failed: Error: dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
  Referenced from: /Users/dulin/workspace/webpack-summer/node_modules/mozjpeg/vendor/cjpeg
  Reason: image not found

    at Promise.all.then.arr (/Users/dulin/workspace/webpack-summer/node_modules/execa/index.js:170:11)
    at process._tickCallback (internal/process/next_tick.js:103:7)
 @ ../~/css-loader!./src/style.css 6:100-126

it seems not support jpg image?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

113reactions
jose920405commented, Sep 18, 2017

Just need update it with brew.

brew reinstall libpng

0reactions
SebastianoFcommented, Aug 9, 2018

To solve the problem I applied the following workaround (that is not optimal, but it is doing the job).

  1. locate libpng16.16.dylib in the system with
find /opt -name "libpng16.16.dylib"

that turned out to be under /opt/X11/lib/ in my system.

  1. make a symlink of “libpng16.16.dylib” where required:
sudo ln -s /opt/X11/lib/libpng16.16.dylib /usr/local/opt/libpng/lib/libpng16.16.dylib

Note that before step 2, you may need to create the folders /usr/local/opt/libpng/lib/ if not present, with:

sudo mkdir -p /usr/local/opt/libpng/lib/
Read more comments on GitHub >

github_iconTop Results From Across the Web

dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16 ...
I get the following error while loading image :
Read more >
Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
How do I resolve this? dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib [...] Reason: no suitable image found.
Read more >
Dyld: Library Not Loaded: /Usr/Local/Opt/Libpng/Lib/Libpng16 ...
Module Build Failed : Error: Dyld: Library Not Loaded: /Usr/Local/Opt/Libpng/Lib/Libpng16.16.Dylib. Mattermost Server. Ensure that log files are being ...
Read more >
Module build failed: Error: dyld: Library not loaded: /usr/local ...
Coding example for the question Module build failed: Error: dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib-Reactjs.
Read more >
Library not loaded: /opt/local/lib/libpng16.16.dylib) – MacPorts
macOS 10.14 (darwin/18.6.0) arch i386 MacPorts 2.5.4 Xcode 10.2.1 SDK 10.14 MACOSX_DEPLOYMENT_TARGET: 10.14 ---> Building ghostscript Error: Failed to build ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found