我无法安装node-sass。 我已经安装了python2.7和Visual C ++ 2015构建工具,当我尝试使用VS2015进行编译时,但是由于看起来缺少头文件错误而更早地被轰炸了。
NPM版本:v4.2.0
节点版本:v7.10.0
节点流程: {http_parser:'2.7.0', 节点:'7.10.0', 第8节:'5.5.372.43', 紫外线:'1.11.0', zlib:'1.2.11', ares:'1.10.1-DEV', 模块:'51', openssl:'1.0.2k', icu:'58 .2', unicode:'9.0', cldr:'30 .0.3', tz:'2016j'}
节点平台:win32 win10
节点架构:x64
node-sass version:错误:无法找到模块'node-sass'
npm node-sass版本(``):不带
npm i --save-dev node-sass
....
....
Release\obj\binding\win_delay_load_hook.obj
"D:\Project\GitRepositorys\awesome-TPC\node_modules\node-sass\build\Release\libsass.lib"
C:\Users\Administrator\.node-gyp\7.10.0\x64\node.lib : fatal error LNK1107: invalid or corrupt file: cannot read at 0xB8790 [D:\Project\ GitRepositorys\awesome-TPC\node_modules\node-sass\build\binding.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (D:\Project\GitRepositorys\awesome-TPC\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:194:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\Project\\GitRepositorys\\awesome-TPC\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd D:\Project\GitRepositorys\awesome-TPC\node_modules\node-sass
gyp ERR! node -v v7.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
答案 0 :(得分:4)
您也可以尝试:https://github.com/node-ffi/node-ffi/issues/272#issuecomment-339242933
After spending 10+ hours and trying random solutions / things, I deleted C:\Users\UserName\.node-gyp folder and did npm i to resolve dependencies, which worked for me.
它对我有用。
答案 1 :(得分:0)
我用其他方法解决了它,
我将npm和节点更新到上一版。
下载node-sass版本https://github.com/sass/node-sass/releases
并安装本地**。node
npm install node-sass sass_binary_path=C:/node-sass/darwin-x64-48_binding.node
it will be ok.
节点SASS