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.

failing to intilaize Sharp on OSX

See original GitHub issue

On a updated node (7.8.0) and up to date giflib (5.1.4) in OSX (10.12.4) I get the following error when I attempt to start my node app that utilizes the latest Sharp (0.17.3 ):

module.js:598
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: dlopen(/Users/jasonsperske/git/test_app/node_modules/sharp/build/Release/sharp.node, 1): Library not loaded: /usr/local/opt/giflib/lib/libgif.4.dylib
  Referenced from: /usr/local/opt/vips/lib/libvips-cpp.42.dylib
  Reason: image not found
    at Object.Module._extensions..node (module.js:598:18)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/jasonsperske/git/test_app/node_modules/sharp/lib/constructor.js:8:15)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/jasonsperske/git/test_app/node_modules/sharp/lib/index.js:3:15)
    at Module._compile (module.js:571:32)

I was able to work around this by adding the following symbolic link:

ln -s /usr/local/opt/giflib/lib/libgif.7.dylib /usr/local/opt/giflib/lib/libgif.4.dylib 

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
jasonsperskecommented, Apr 10, 2017

Worked perfectly! Now I have to figure out why I at one point felt the need to brew install vips 😃

2reactions
lovellcommented, Apr 10, 2017

If you don’t need a custom installation of vips then you can brew uninstall vips, remove node_modules/sharp then npm i and sharp will install its own prebuilt version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reset the printing system on your Mac to solve a problem
On your Mac, choose Apple menu > System Settings, then click Printers & Scanners in the sidebar. (You may need to scroll down.)...
Read more >
Error installing sharp with npm on macOS - Stack Overflow
I found out there is a missing global dependency for sharp . If you run npm install -g node-gyp. first, then npm install...
Read more >
Error: Something went wrong installing the "sharp" module ...
It looks like I can install sharp with 'npm i', but it shows errors during 'gatsby develop'. npm i. > sharp@0.27.2 install /Users/langchen/ ......
Read more >
How To Setup Printing with Mac OSX on Sharp Printer
Here are simple instructions for setting up your Sharp printer on your Mac computer. You'll need the IP address of your printer, ...
Read more >
Solved: Installer failed to initialize - Adobe Support Community
1. Try to Create a new user account in Mac with Administrator Priviledges. 2. Login to the New user, Navigate to Mac HD>...
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