Failure on install : Cannot install node-sass
:rainbow: Node.js bindings to libsass
Brought to you by:
imran1012000k
Originally created by: lefuturiste
Hi!
When I run : npm install node-sass --save --unsafe-perms
On my project : Source here, I use webpack-simple vuejs template.
Full error :
make: Entering directory '/var/www/apps/clocker.lefuturiste.fr/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' '-DLIBSASS_VERSION="3.5.4"' -I/home/pi/.node-gyp/10.4.1/include/node -I/home/pi/.node-gyp/10.4.1/src -I/home/pi/.node-gyp/10.4.1/deps/openssl/config -I/home/pi/.node-gyp/10.4.1/deps/openssl/openssl/include -I/home/pi/.node-gyp/10.4.1/deps/uv/include -I/home/pi/.node-gyp/10.4.1/deps/zlib -I/home/pi/.node-gyp/10.4.1/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++: Command not found
src/libsass.target.mk:148: recipe for target 'Release/obj.target/libsass/src/libsass/src/ast.o' failed
make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] Error 127
make: Leaving directory '/var/www/apps/clocker.lefuturiste.fr/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 (/var/www/apps/clocker.lefuturiste.fr/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.9.35-v7+
gyp ERR! command "/usr/bin/node" "/var/www/apps/clocker.lefuturiste.fr/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /var/www/apps/clocker.lefuturiste.fr/node_modules/node-sass
gyp ERR! node -v v10.4.1
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.9.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.9.0 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/pi/.npm/_logs/2018-06-20T19_57_51_022Z-debug.log
Complete log file : here
npm -v): 6.1.0node -v): v10.4.1Node Process (node -p process.versions):
:::js
{ http_parser: '2.8.0',
node: '10.4.1',
v8: '6.7.288.45-node.7',
uv: '1.20.3',
zlib: '1.2.11',
ares: '1.14.0',
modules: '64',
nghttp2: '1.32.0',
napi: '3',
openssl: '1.1.0h',
icu: '61.1',
unicode: '10.0',
cldr: '33.0',
tz: '2018c' }
Node Platform (node -p process.platform): linux
node -p process.arch): armThanks for the answers!
Originally posted by: lefuturiste
Complete output of
node-sass installation test.sh: https://gist.github.com/lefuturiste/45f867e4b9830a55602331b6098d3f0dOriginally posted by: nschonni
Sorry, we don't currently support building on ARM. That might change in a future release.
Ticket changed by: nschonni
Originally posted by: lefuturiste
Ok, so I can't dev on my raspberry pi ? 😭
Originally posted by: xzyfer
In theory it should work, there are people definitely doing it. But you'll need to build the binary yourself. You'll need to install the build tool C in the rpi.
Looks like you're missing g++