gpt4 book ai didi

node.js - node-sass - sass_context_wrapper.h :8:10: fatal error: sass/context. h:没有这样的文件或目录

转载 作者:太空宇宙 更新时间:2023-11-03 22:05:06 24 4
gpt4 key购买 nike

我正在尝试安装node-sass但失败并出现以下错误。我尝试rebuild命令但一点运气都没有 - sudo npm重建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

有什么想法吗?我能做什么?

最佳答案

尝试使用 LIBSASS_EXT="no"npm install 安装它(删除 node_modules 文件夹以触发 node-sass 构建,但要意识到删除) - 基本上你必须检查你的 libsass 安装。您的机器上安装了 libsass 吗?在 Mac 上,它是 brew install libsassLinux .

关于node.js - node-sass - sass_context_wrapper.h :8:10: fatal error: sass/context. h:没有这样的文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56195342/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com