Can't build node-sass

Hello everyone,
I recently started using manjaro arm on my android phone using the andronix modded os version in termux. I'm new to manjaro and arch systems in general so I have a lot to learn but I've been using ubuntu mainly for a few years.

I have also used the ubuntu xfce install from andronix and within that I was able to install node-sass in a project using npm. Since there isn't a binary for arm64 officially available it built it but ubuntu had no problems with it. However when I try to install node-sass in manjaro it errors out:

Building: /home/spam/.nvm/versions/node/v10.22.0/bin/node /home/spam/practice/olol/33dmg-vue/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/home/spam/.nvm/versions/node/v10.22.0/bin/node',
gyp verb cli   '/home/spam/practice/olol/33dmg-vue/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using node-gyp@3.8.0
gyp info using node@10.22.0 | linux | arm64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import sys; print "2.7.18
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 10.22.0
gyp verb command install [ '10.22.0' ]
gyp verb install input version string "10.22.0"
gyp verb install installing version: 10.22.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 10.22.0
gyp verb build dir attempting to create "build" dir: /home/spam/practice/olol/33dmg-vue/node_modules/node-sass/build
gyp verb build dir "build" dir needed to be created? /home/spam/practice/olol/33dmg-vue/node_modules/node-sass/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /home/spam/practice/olol/33dmg-vue/node_modules/node-sass/build/config.gypi
gyp verb config.gypi checking for gypi file: /home/spam/practice/olol/33dmg-vue/node_modules/node-sass/config.gypi
gyp verb common.gypi checking for gypi file: /home/spam/practice/olol/33dmg-vue/node_modules/node-sass/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/home/spam/practice/olol/33dmg-vue/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/spam/practice/olol/33dmg-vue/node_modules/node-sass/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/spam/practice/olol/33dmg-vue/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/spam/.node-gyp/10.22.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/spam/.node-gyp/10.22.0',
gyp info spawn args   '-Dnode_gyp_dir=/home/spam/practice/olol/33dmg-vue/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/spam/.node-gyp/10.22.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/spam/practice/olol/33dmg-vue/node_modules/node-sass',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture arm64
gyp verb node dev dir /home/spam/.node-gyp/10.22.0
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/spam/practice/olol/33dmg-vue/node_modules/node-sass/build'
  g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_NO_PINSHARED' '-DLIBSASS_VERSION="3.5.5"' -I/home/spam/.node-gyp/10.22.0/include/node -I/home/spam/.node-gyp/10.22.0/src -I/home/spam/.node-gyp/10.22.0/deps/openssl/config -I/home/spam/.node-gyp/10.22.0/deps/openssl/openssl/include -I/home/spam/.node-gyp/10.22.0/deps/uv/include -I/home/spam/.node-gyp/10.22.0/deps/zlib -I/home/spam/.node-gyp/10.22.0/deps/v8/include -I../src/libsass/include  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -O3 -fno-omit-frame-pointer -std=gnu++1y -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw   -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp
make: g++: No such file or directory
make: *** [src/libsass.target.mk:150: Release/obj.target/libsass/src/libsass/src/ast.o] Error 127
make: Leaving directory '/home/spam/practice/olol/33dmg-vue/node_modules/node-sass/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/spam/practice/olol/33dmg-vue/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.9.186-klabitV6.3
gyp ERR! command "/home/spam/.nvm/versions/node/v10.22.0/bin/node" "/home/spam/practice/olol/33dmg-vue/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/spam/practice/olol/33dmg-vue/node_modules/node-sass
gyp ERR! node -v v10.22.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.14.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/spam/.npm/_logs/2020-08-07T05_54_58_900Z-debug.log

I think I'm missing some common package you would usually install along with make since the first error I got was because make wasn't even installed. What packages should I install just in general for make to work normally and what else should I do to help fix this? Thanks for your help.

Here's some info on my device, Note 9 N9600 rooted:

$ inxi --full --verbosity=7 --filter --no-host
System:    Kernel: 4.9.186-klabitV6.3 aarch64 bits: 64 compiler: gcc v: 4.9.x Console: tty 0 dm: N/A Distro: Manjaro ARM
Machine:   Type: ARM Device System: Qualcomm SDM845
Memory:    RAM: total: 5.45 GiB used: 4.32 GiB (79.2%)                                                                                             RAM Report: missing: Required program dmidecode not available
CPU:       Topology: 8-Core model: AArch64 bits: 64 type: MCP arch: aarch64 rev: 12 bogomips: 0
           Speed: N/A min/max: N/A Core speeds (MHz): No speed data found for 8 cores.
           Features: aes asimd asimdhp atomics crc32 evtstrm fp fphp pmull sha1 sha2
Graphics:  Message: No Device data found.
           Display: server: No display server data found. Headless machine? tty: 136x62
           Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:     Device-1: sdm845-tavil-snd-card driver: sdm845-tavil-sn message: bus/chip ids unavailable                                               Sound Server: ALSA v: k4.9.186-klabitV6.3
Network:   Device-1: Broadcom and subsidiaries driver: N/A port: N/A bus ID: 01:00.0 chip ID: 14e4:441f
           WAN IP: <filter>                                                                                                             Drives:    Local Storage: total: 357.68 GiB used: 58.42 GiB (16.3%)
           ID-1: /dev/mmcblk0 model: N/A size: 238.50 GiB serial: N/A
           ID-2: /dev/sda model: N/A size: 119.11 GiB serial: N/A                                                                                  ID-3: /dev/sdb model: N/A size: 4.0 MiB serial: N/A
           ID-4: /dev/sdc model: N/A size: 4.0 MiB serial: N/A
           ID-5: /dev/sdd model: N/A size: 60.0 MiB serial: N/A
           Message: No Optical or Floppy data was found.
RAID:      Message: No RAID data was found.
Partition: ID-1: / size: 110.41 GiB used: 56.42 GiB (51.1%) fs: ext4 dev: /dev/block/platform/soc/1d84000.ufshc/by-name/system
           label: N/A uuid: N/A
           ID-2: swap-1 size: 2.00 GiB used: 2.00 GiB (100.0%) fs: swap dev: /dev/block/vnswap0 label: N/A uuid: N/A
Unmounted: ID-1: /dev/mmcblk0p1 size: 238.47 GiB fs: <root required> label: N/A uuid: N/A
           ID-2: /dev/sda1 size: 2.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-3: /dev/sda10 size: 30.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-4: /dev/sda11 size: 21.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-5: /dev/sda12 size: 512 KiB fs: <root required> label: N/A uuid: N/A
           ID-6: /dev/sda13 size: 4.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-7: /dev/sda14 size: 16.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-8: /dev/sda15 size: 6.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-9: /dev/sda16 size: 95.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-10: /dev/sda17 size: 85.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-11: /dev/sda18 size: 32.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-12: /dev/sda19 size: 8.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-13: /dev/sda2 size: 2.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-14: /dev/sda20 size: 64.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-15: /dev/sda21 size: 69.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-16: /dev/sda22 size: 4.67 GiB fs: <root required> label: N/A uuid: N/A
           ID-17: /dev/sda23 size: 822.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-18: /dev/sda24 size: 450.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-19: /dev/sda25 size: 321.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-20: /dev/sda26 size: 5.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-21: /dev/sda27 size: 80.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-22: /dev/sda28 size: 10.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-23: /dev/sda29 size: 112.30 GiB fs: <root required> label: N/A uuid: N/A
           ID-24: /dev/sda3 size: 4 KiB fs: <root required> label: N/A uuid: N/A
           ID-25: /dev/sda4 size: 8 KiB fs: <root required> label: N/A uuid: N/A
           ID-26: /dev/sda5 size: 32.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-27: /dev/sda6 size: 20.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-28: /dev/sda7 size: 10.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-29: /dev/sda8 size: 1024 KiB fs: <root required> label: N/A uuid: N/A
           ID-30: /dev/sda9 size: 512 KiB fs: <root required> label: N/A uuid: N/A
           ID-31: /dev/sdb1 size: 3.2 MiB fs: <root required> label: N/A uuid: N/A
           ID-32: /dev/sdb2 size: 612 KiB fs: <root required> label: N/A uuid: N/A
           ID-33: /dev/sdc1 size: 3.2 MiB fs: <root required> label: N/A uuid: N/A
           ID-34: /dev/sdc2 size: 612 KiB fs: <root required> label: N/A uuid: N/A
           ID-35: /dev/sdd1 size: 1024 KiB fs: <root required> label: N/A uuid: N/A
           ID-36: /dev/sdd10 size: 1024 KiB fs: <root required> label: N/A uuid: N/A
           ID-37: /dev/sdd11 size: 384 KiB fs: <root required> label: N/A uuid: N/A
           ID-38: /dev/sdd12 size: 512 KiB fs: <root required> label: N/A uuid: N/A
           ID-39: /dev/sdd13 size: 512 KiB fs: <root required> label: N/A uuid: N/A
           ID-40: /dev/sdd14 size: 512 KiB fs: <root required> label: N/A uuid: N/A
           ID-41: /dev/sdd15 size: 256 KiB fs: <root required> label: N/A uuid: N/A
           ID-42: /dev/sdd16 size: 256 KiB fs: <root required> label: N/A uuid: N/A
           ID-43: /dev/sdd17 size: 4 KiB fs: <root required> label: N/A uuid: N/A
           ID-44: /dev/sdd18 size: 4 KiB fs: <root required> label: N/A uuid: N/A
           ID-45: /dev/sdd19 size: 128 KiB fs: <root required> label: N/A uuid: N/A
           ID-46: /dev/sdd2 size: 2.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-47: /dev/sdd20 size: 512 KiB fs: <root required> label: N/A uuid: N/A
           ID-48: /dev/sdd21 size: 64 KiB fs: <root required> label: N/A uuid: N/A
           ID-49: /dev/sdd22 size: 64 KiB fs: <root required> label: N/A uuid: N/A
           ID-50: /dev/sdd23 size: 2.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-51: /dev/sdd24 size: 2.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-52: /dev/sdd25 size: 2.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-53: /dev/sdd26 size: 39.2 MiB fs: <root required> label: N/A uuid: N/A
           ID-54: /dev/sdd3 size: 2.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-55: /dev/sdd4 size: 512 KiB fs: <root required> label: N/A uuid: N/A
           ID-56: /dev/sdd5 size: 512 KiB fs: <root required> label: N/A uuid: N/A
           ID-57: /dev/sdd6 size: 16 KiB fs: <root required> label: N/A uuid: N/A
           ID-58: /dev/sdd7 size: 512 KiB fs: <root required> label: N/A uuid: N/A
           ID-59: /dev/sdd8 size: 4.0 MiB fs: <root required> label: N/A uuid: N/A
           ID-60: /dev/sdd9 size: 4 KiB fs: <root required> label: N/A uuid: N/A
           ID-61: /dev/vnswap0 size: 2.00 GiB fs: <root required> label: N/A uuid: N/A
USB:       Missing: Required tool lsusb not installed. Check --recommends
Sensors:   Message: No sensors data was found. Is sensors configured?
Info:      Processes: 53 Uptime: 3d 11h 13m Init: N/A v: N/A Compilers: gcc: N/A Shell: bash v: 5.0.17 running in: tty 0
           inxi: 3.0.37

For building software, make sure you have the entire base-devel group installed. This can be done with:

sudo pacman -Syu base-devel --needed
1 Like

thanks a bunch! that seems to have installed whatever it was I was missing

No problem. From the error in your snippet, you seemed to be missing gcc, which is a vital part of using make. :slight_smile:

Forum kindly sponsored by