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.

Error relocating /app/node_modules/bcrypt/build/Release/bcrypt_lib.node: __snprintf_chk: symbol not found

See original GitHub issue

I have a base docker image I use for my builds with node v7 installed. I use it to npm install and then copy everything in a fresh docker image that is based on alpine (node:7-alpine). I am getting the following error when running tests in my alpine container:

Error: Error relocating /app/node_modules/bcrypt/build/Release/bcrypt_lib.node: __snprintf_chk: symbol 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)

I guess my base image and the alpine one use a different stdlib or something like that?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

16reactions
AkdMcommented, Jul 7, 2017

Any idea how I can build it instead of downloading the file located at https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v51-linux-x64.tar.gz? I am using an Alpine image too. Thanks

Edit: Got it from their documentation. If you’re using bcrypt, run the following command: npm rebuild bcrypt --build-from-source

2reactions
mayaskcommented, Oct 11, 2017

For all those you didn’t get it to work after adding --build-from-source=bcrypt (or equivalent rebuild command after install) - make sure you’re not copying your local node_modules into the image by adding .dockerignore file with contents:

node_modules/
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error relocating /usr/bin/node: _ZSt28__ ...
Hey guys, I added apk ugrade to my Dockerfile , but it didnt seem to help . I still get _ZSt28__throw_bad_array_new_lengthv: symbol not...
Read more >
Error relocating - building docker-fpm-alpine image
Don't fully understand what "Error relocating symbol not found" means, the previous steps ran successfully, this is the error output:
Read more >
Error relocating /usr/bin/node ...
Error relocating /usr/bin/node: nghttp2_option_set_max_settings: symbol not found. Just FYI. Facing the following issue after this change ...
Read more >
victor.degliame - Fly.io
I am suddenly getting errors while deploying, even though I didn't change anything in my dockerfile or any code that might affect deployment ......
Read more >
Error while using @cryptlex/lexactivator in my nodejs ...
Hi, I'm getting the following error on using @cryptlex/lexactivator package in my nodejs application running in alpine docker image.
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