Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Alpine linux support still not fully working #1868

Closed
virtser opened this issue Jan 25, 2017 · 13 comments
Closed

Alpine linux support still not fully working #1868

virtser opened this issue Jan 25, 2017 · 13 comments

Comments

@virtser
Copy link

virtser commented Jan 25, 2017

I upgraded to the latest version as introduced Alpine linux support in #1589.

Building Alpine linux docker container and running yarn install command passes.
But getting full log of such errors on web app loading for the first time:

ERROR in Error relocating /home/nodejs/app/node_modules/node-sass/vendor/linux-x64-48/binding.node: __strtod_internal: symbol not found
@ ./src/components/sharedStyles/styles.scss 4:14-139

After installing the following packages and running yarn again the app work without errors:
apk add --no-cache python=2.7.12-r0 make gcc g++

What am I doing wrong?


  • NPM version (npm -v): 3.10.10
  • Node version (node -v): v6.9.4
  • Node Process (node -p process.versions):
{ http_parser: '2.7.0',
  node: '6.9.4',
  v8: '5.1.281.89',
  uv: '1.9.1',
  zlib: '1.2.8',
  ares: '1.10.1-DEV',
  icu: '57.1',
  modules: '48',
  openssl: '1.0.2j' }
  • Node Platform (node -p process.platform): linux
  • Node architecture (node -p process.arch): x64
  • node-sass version (node -p "require('node-sass').info"):
node-sass       4.3.0   (Wrapper)       [JavaScript]
libsass         3.4.0   (Sass Compiler) [C/C++]
@virtser virtser changed the title Alpine support still not working Alpine support still not fully working? Jan 25, 2017
@virtser virtser changed the title Alpine support still not fully working? Alpine support still not fully working Jan 25, 2017
@virtser virtser changed the title Alpine support still not fully working Alpine linux support still not fully working Jan 25, 2017
@xzyfer
Copy link
Contributor

xzyfer commented Jan 25, 2017

Yarn has plenty of issues with native extensions that are out of our hands. Does it work with npm?

@xzyfer
Copy link
Contributor

xzyfer commented Jan 25, 2017

linux-x64-48/binding.node

Suggests that the install was done on linux, not alpine. Did you install locally and mount into to docker? If so you'll need to rebuild the binary with npm rebuild node-sass.

@virtser
Copy link
Author

virtser commented Jan 25, 2017

@xzyfer no I didn't install locally, as part of Dockerfile build. You can see the base image here:
https://github.com/dorbel-tech/alpine-node/blob/master/Dockerfile

@xzyfer
Copy link
Contributor

xzyfer commented Jan 25, 2017

Please try using npm to rule out yarn as the cause.

@virtser
Copy link
Author

virtser commented Jan 25, 2017

@xzyfer yeah, it looks like installing node-sass globally using npm helps:

npm install --global node-sass --no-progress

Thanks a lot!
Should I close this issue? Report to yarn or something?

@xzyfer
Copy link
Contributor

xzyfer commented Jan 25, 2017

FWIW you should never install node-sass globally. It's likely to run into permission issues because it's a native extension.

@xzyfer
Copy link
Contributor

xzyfer commented Jan 25, 2017

It's worth opening an issue with yarn if you get more detailed information on what exactly was the issue.

@xzyfer xzyfer closed this as completed Jan 25, 2017
@A21z
Copy link

A21z commented Feb 21, 2017

FTR I had a similar issue:

Binary has a problem: Error: Error relocating /var/www/node_modules/node-sass/vendor/linux_musl-x64-48/binding.node: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_capacityEm: symbol not found

I fixed it bumping Alpine from 3.2 to 3.5.

@mcfilib
Copy link

mcfilib commented Aug 10, 2017

I also experienced this issue using yarn. When I inspect the file system, I can see that the linux-x64-48/binding.node is present but linux_musl-x64-48/binding.node is not e.g.

bash-4.3# ls node_modules/node-sass/vendor/linux-x64-48/binding.node 
node_modules/node-sass/vendor/linux-x64-48/binding.node

When I install node-sass manually with npm, the correct binding is installed. Can anyone advise me on how the binding.node is created so I can understand why this problem seems to be happening with yarn?

@mcfilib
Copy link

mcfilib commented Aug 10, 2017

I did some further testing and it is definitely a yarn issue. I was able to work around it by doing npm install node-sass@xxx after I did my yarn install.

@xzyfer
Copy link
Contributor

xzyfer commented Aug 10, 2017

Please open an issue with yarn.

@mcfilib
Copy link

mcfilib commented Aug 10, 2017

Absolutely.

I wanted to make a note of it here in case other people found this issue via Google like I did.

@saper
Copy link
Member

saper commented Aug 10, 2017

I wonder how this could be a yarn issue, that looks like a musl incompatibility to me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants