Sharp: Error loading shared library /usr/src/app/node_modules/sharp/build/Release/sharp.node: Exec format error

Created on 17 Jan 2018  路  1Comment  路  Source: lovell/sharp

On docker-compose up


return process.dlopen(module, path._makeLong(filename));
^
Error: Error loading shared library /usr/src/app/node_modules/sharp/build/Release/sharp.node: Exec format error
at Object.Module._extensions..node (module.js:664:18)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (/usr/src/app/node_modules/sharp/lib/constructor.js:10:15)
at Module._compile (module.js:635:30)
at Module._extensions..js (module.js:646:10)
at Object.require.extensions.(anonymous function) [as .js] (/usr/src/app/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)

at Object. (/usr/src/app/node_modules/sharp/lib/index.js:3:15)

question

>All comments

Hello, the same platform (and same major version of Node) has to be used at both npm install time and runtime.

You've not said what platforms are involved here but I would guess this is an OS X host running a Docker-managed Linux container.

Running npm install inside the container should solve this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

paulieo10 picture paulieo10  路  3Comments

tomercagan picture tomercagan  路  3Comments

terbooter picture terbooter  路  3Comments

emmtte picture emmtte  路  3Comments

jaydenseric picture jaydenseric  路  3Comments