node-sass - sass_context_wrapper.h: 8: 10: фатальная ошибка: sass / context.h: такого файла или каталога нет - PullRequest
1 голос
/ 18 мая 2019

Я пытаюсь установить node-sass , но не удалось с ошибкой ниже. Я пытался перестроить команду, но безуспешно - sudo npm rebuild node-sass

$ npm install node-sass     

...
...
...
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir /home/lau/.node-gyp/10.12.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 '/var/www/html/projects/autopoiesis/autopoiesis/node_modules/gulp-sass/node_modules/node-sass/build'
  g++ '-DNODE_GYP_MODULE_NAME=binding' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/lau/.node-gyp/10.12.0/include/node -I/home/lau/.node-gyp/10.12.0/src -I/home/lau/.node-gyp/10.12.0/deps/openssl/config -I/home/lau/.node-gyp/10.12.0/deps/openssl/openssl/include -I/home/lau/.node-gyp/10.12.0/deps/uv/include -I/home/lau/.node-gyp/10.12.0/deps/zlib -I/home/lau/.node-gyp/10.12.0/deps/v8/include -I../../../../nan  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++1y -std=c++0x -MMD -MF ./Release/.deps/Release/obj.target/binding/src/binding.o.d.raw   -c -o Release/obj.target/binding/src/binding.o ../src/binding.cpp
In file included from ../src/binding.cpp:3:0:
../src/sass_context_wrapper.h:8:10: fatal error: sass/context.h: No such file or directory
 #include <sass/context.h>
          ^~~~~~~~~~~~~~~~
compilation terminated.
binding.target.mk:116: recipe for target 'Release/obj.target/binding/src/binding.o' failed
make: *** [Release/obj.target/binding/src/binding.o] Error 1
make: Leaving directory '/var/www/html/projects/autopoiesis/autopoiesis/node_modules/gulp-sass/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/html/projects/autopoiesis/autopoiesis/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:240:12)
gyp ERR! System Linux 4.15.0-36-generic
gyp ERR! command "/usr/bin/node" "/var/www/html/projects/autopoiesis/autopoiesis/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /var/www/html/projects/autopoiesis/autopoiesis/node_modules/gulp-sass/node_modules/node-sass
gyp ERR! node -v v10.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1
npm WARN website@0.1.0 No description
npm WARN website@0.1.0 No repository field.
npm WARN website@0.1.0 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@3.13.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-sass@3.13.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/lau/.npm/_logs/2019-05-18T01_33_09_744Z-debug.log

Есть идеи, почему? Что я могу сделать?

1 Ответ

1 голос
/ 18 мая 2019

Попробуйте установить его с LIBSASS_EXT="no" npm install (удалите папку node_modules, чтобы запустить сборку node-sass, но помните об удалении) - в основном вы должны проверить установку libsass. Вы установили libsass на свой компьютер? На Mac это будет brew install libsass или Linux .

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...