无法通过npm安装node-sass,我的操作系统是windows10。
以下错误消息:
> node-sass@3.8.0 postinstall K:\vuejs\my-project\node_modules\node-sass
> node scripts/build.js
postinstall:sass-graph ▄ ╢████████████████████████████████████████████ "K:\vuejs\my-project\node_modules\node-sass\vendor\win32-x64-47\binding.node" exists.
testing binary.
Problem with the binary:
Error: %1 is not a valid Win32 application.
\\?\K:\vuejs\my-project\node_modules\node-sass\vendor\win32-x64-47\binding.node
Manual build incoming.
Building: K:\nodejs\node.exe K:\vuejs\my-project\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 [ 'K:\\nodejs\\node.exe',
gyp verb cli 'K:\\vuejs\\my-project\\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.4.0
gyp info using node@5.2.0 | win32 | x64
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` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (K:\vuejs\my-project\node_modules\which\which.js:14:12)
gyp verb `which` failed at F (K:\vuejs\my-project\node_modules\which\which.js:69:19)
gyp verb `which` failed at E (K:\vuejs\my-project\node_modules\which\which.js:81:29)
gyp verb `which` failed at K:\vuejs\my-project\node_modules\which\which.js:90:16
gyp verb `which` failed at K:\vuejs\my-project\node_modules\isexe\index.js:44:5
gyp verb `which` failed at K:\vuejs\my-project\node_modules\isexe\windows.js:29:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:83:15)
gyp verb `which` failed python2 { [Error: not found: python2] code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:\Python27\python.EXE
gyp verb check python version `C:\Python27\python.EXE -c "import platform; print(platform.python_version());"` returned: "2.7.9\r\n"
gyp verb get node dir no --target version specified, falling back to host node version: 5.2.0
gyp verb command install [ '5.2.0' ]
gyp verb install input version string "5.2.0"
gyp verb install installing version: 5.2.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: 5.2.0
gyp verb build dir attempting to create "build" dir: K:\vuejs\my-project\node_modules\node-sass\build
gyp verb build dir "build" dir needed to be created? K:\vuejs\my-project\node_modules\node-sass\build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: K:\vuejs\my-project\node_modules\node-sass\build\config.gypi
gyp verb config.gypi checking for gypi file: K:\vuejs\my-project\node_modules\node-sass\config.gypi
gyp verb common.gypi checking for gypi file: K:\vuejs\my-project\node_modules\node-sass\common.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn C:\Python27\python.EXE
gyp info spawn args [ 'K:\\vuejs\\my-project\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'K:\\vuejs\\my-project\\node_modules\\node-sass\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'K:\\vuejs\\my-project\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\刘健超\\.node-gyp\\5.2.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=C:\\Users\\刘健超\\.node-gyp\\5.2.0',
gyp info spawn args '-Dnode_gyp_dir=K:\\vuejs\\my-project\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=K:\\vuejs\\my-project\\node_modules\\node-sass',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'K:\\vuejs\\my-project\\node_modules\\node-sass\\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir C:\Users\刘健超\.node-gyp\5.2.0
gyp verb found first Solution file build/binding.sln
gyp verb could not find "msbuild.exe" in PATH - finding location in registry
gyp verb "Release" dir needed to be created? null
gyp verb copying "node.lib" for x64 C:\Users\刘健超\.node-gyp\5.2.0\Release\node.lib
gyp info spawn C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64' ]
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
生成启动时间为 2016-7-21 9:30:50。
节点 1 上的项目“K:\vuejs\my-project\node_modules\node-sass\build\binding.sln”(默认目标)。
ValidateSolutionConfiguration:
正在生成解决方案配置“Release|x64”。
项目“K:\vuejs\my-project\node_modules\node-sass\build\binding.sln”(1)正在节点 1 上生成“K:\vuejs\my-project\node_modules\node-sas
s\build\binding.vcxproj.metaproj”(2) (默认目标)。
项目“K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj.metaproj”(2)正在节点 1 上生成“K:\vuejs\my-project\node_mod
ules\node-sass\build\src\libsass.vcxproj”(3) (默认目标)。
PrepareForBuild:
正在创建目录“Release\obj\libsass\”。
正在创建目录“K:\vuejs\my-project\node_modules\node-sass\build\Release\”。
正在创建目录“Release\obj\libsass\libsass.tlog\”。
InitializeBuildStatus:
正在创建“Release\obj\libsass\libsass.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。
ClCompile:
M:\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\CL.exe /c /I"C:\Users\á???3?\.node-gyp\5.2.0\include\node" /I"C:\Use
rs\á???3?\.node-gyp\5.2.0\src" /I"C:\Users\á???3?\.node-gyp\5.2.0\deps\uv\include" /I"C:\Users\á???3?\.node-gyp\5.2.0
\deps\v8\include" /I..\..\src\libsass\include /Zi /nologo /W3 /WX- /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=l
ibsass /D USING_UV_SHARED=1 /D USING_V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D
_CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D "LIBSASS_VERSION=\"3.3.6\"" /GF /Gm- /MT /GS /Gy /fp:precise /Zc:w
char_t /Zc:forScope /GR- /Fo"Release\obj\libsass\\" /Fd"Release\obj\libsass\vc120.pdb" /Gd /TP /wd4351 /wd4355 /wd480
0 /wd4251 /errorReport:queue /GR /EHsc /MP ..\..\src\libsass\src\ast.cpp ..\..\src\libsass\src\base64vlq.cpp ..\..\sr
c\libsass\src\bind.cpp ..\..\src\libsass\src\color_maps.cpp ..\..\src\libsass\src\constants.cpp ..\..\src\libsass\src
\context.cpp ..\..\src\libsass\src\cssize.cpp ..\..\src\libsass\src\emitter.cpp ..\..\src\libsass\src\environment.cpp
..\..\src\libsass\src\error_handling.cpp ..\..\src\libsass\src\eval.cpp ..\..\src\libsass\src\expand.cpp ..\..\src\l
ibsass\src\extend.cpp ..\..\src\libsass\src\file.cpp ..\..\src\libsass\src\functions.cpp ..\..\src\libsass\src\inspec
t.cpp ..\..\src\libsass\src\json.cpp ..\..\src\libsass\src\lexer.cpp ..\..\src\libsass\src\listize.cpp ..\..\src\libs
ass\src\memory_manager.cpp ..\..\src\libsass\src\node.cpp ..\..\src\libsass\src\output.cpp ..\..\src\libsass\src\pars
er.cpp ..\..\src\libsass\src\plugins.cpp ..\..\src\libsass\src\position.cpp ..\..\src\libsass\src\prelexer.cpp ..\..\
src\libsass\src\remove_placeholders.cpp ..\..\src\libsass\src\sass.cpp ..\..\src\libsass\src\sass2scss.cpp ..\..\src\
libsass\src\sass_context.cpp ..\..\src\libsass\src\sass_functions.cpp ..\..\src\libsass\src\sass_util.cpp ..\..\src\l
ibsass\src\sass_values.cpp ..\..\src\libsass\src\source_map.cpp ..\..\src\libsass\src\to_c.cpp ..\..\src\libsass\src\
to_value.cpp ..\..\src\libsass\src\units.cpp ..\..\src\libsass\src\utf8_string.cpp ..\..\src\libsass\src\util.cpp ..\
..\src\libsass\src\values.cpp
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
ast.cpp
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
base64vlq.cpp
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
bind.cpp
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
color_maps.cpp
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
constants.cpp
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
context.cpp
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
cssize.cpp
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
emitter.cpp
environment.cpp
error_handling.cpp
eval.cpp
..\..\src\libsass\src\bind.cpp(175): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 [K:\vuejs\my-project\node_modules\n
ode-sass\build\src\libsass.vcxproj]
expand.cpp
extend.cpp
file.cpp
functions.cpp
inspect.cpp
json.cpp
..\..\src\libsass\src\json.cpp(26): warning C4005: “_CRT_NONSTDC_NO_DEPRECATE”: 宏重定义 [K:\vuejs\my-project\node_modules\
node-sass\build\src\libsass.vcxproj]
命令行参数: 参见前面的“_CRT_NONSTDC_NO_DEPRECATE”定义
lexer.cpp
listize.cpp
memory_manager.cpp
node.cpp
output.cpp
parser.cpp
plugins.cpp
position.cpp
prelexer.cpp
remove_placeholders.cpp
sass.cpp
sass2scss.cpp
..\..\src\libsass\src\sass2scss.cpp(9): warning C4005: “_CRT_NONSTDC_NO_DEPRECATE”: 宏重定义 [K:\vuejs\my-project\node_modu
les\node-sass\build\src\libsass.vcxproj]
命令行参数: 参见前面的“_CRT_NONSTDC_NO_DEPRECATE”定义
sass_context.cpp
sass_functions.cpp
sass_util.cpp
sass_values.cpp
source_map.cpp
to_c.cpp
to_value.cpp
units.cpp
utf8_string.cpp
util.cpp
values.cpp
M:\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\CL.exe /c /I"C:\Users\á???3?\.node-gyp\5.2.0\include\node" /I"C:\Use
rs\á???3?\.node-gyp\5.2.0\src" /I"C:\Users\á???3?\.node-gyp\5.2.0\deps\uv\include" /I"C:\Users\á???3?\.node-gyp\5.2.0
\deps\v8\include" /I..\..\src\libsass\include /Zi /nologo /W3 /WX- /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=l
ibsass /D USING_UV_SHARED=1 /D USING_V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D
_CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D "LIBSASS_VERSION=\"3.3.6\"" /GF /Gm- /MT /GS /Gy /fp:precise /Zc:w
char_t /Zc:forScope /GR- /Fo"Release\obj\libsass\\" /Fd"Release\obj\libsass\vc120.pdb" /Gd /TC /wd4351 /wd4355 /wd480
0 /wd4251 /errorReport:queue /GR /EHsc /MP ..\..\src\libsass\src\cencode.c ..\..\src\libsass\src\c99func.c
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
cencode.c
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
c99func.c
Lib:
M:\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\Lib.exe /OUT:"K:\vuejs\my-project\node_modules\node-sass\build\Relea
se\libsass.lib" /NOLOGO /MACHINE:X64 /LTCG Release\obj\libsass\ast.obj
Release\obj\libsass\base64vlq.obj
Release\obj\libsass\bind.obj
Release\obj\libsass\cencode.obj
Release\obj\libsass\color_maps.obj
Release\obj\libsass\constants.obj
Release\obj\libsass\context.obj
Release\obj\libsass\cssize.obj
Release\obj\libsass\emitter.obj
Release\obj\libsass\environment.obj
Release\obj\libsass\error_handling.obj
Release\obj\libsass\eval.obj
Release\obj\libsass\expand.obj
Release\obj\libsass\extend.obj
Release\obj\libsass\file.obj
Release\obj\libsass\functions.obj
Release\obj\libsass\inspect.obj
Release\obj\libsass\json.obj
Release\obj\libsass\lexer.obj
Release\obj\libsass\listize.obj
Release\obj\libsass\memory_manager.obj
Release\obj\libsass\node.obj
Release\obj\libsass\output.obj
Release\obj\libsass\parser.obj
Release\obj\libsass\plugins.obj
Release\obj\libsass\position.obj
Release\obj\libsass\prelexer.obj
Release\obj\libsass\remove_placeholders.obj
Release\obj\libsass\sass.obj
Release\obj\libsass\sass2scss.obj
Release\obj\libsass\sass_context.obj
Release\obj\libsass\sass_functions.obj
Release\obj\libsass\sass_util.obj
Release\obj\libsass\sass_values.obj
Release\obj\libsass\source_map.obj
Release\obj\libsass\to_c.obj
Release\obj\libsass\to_value.obj
Release\obj\libsass\units.obj
Release\obj\libsass\utf8_string.obj
Release\obj\libsass\util.obj
Release\obj\libsass\values.obj
Release\obj\libsass\c99func.obj
libsass.vcxproj -> K:\vuejs\my-project\node_modules\node-sass\build\Release\\libsass.lib
FinalizeBuildStatus:
正在删除文件“Release\obj\libsass\libsass.tlog\unsuccessfulbuild”。
正在对“Release\obj\libsass\libsass.tlog\libsass.lastbuildstate”执行 Touch 任务。
已完成生成项目“K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj”(默认目标)的操作。
项目“K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj.metaproj”(2)正在节点 1 上生成“K:\vuejs\my-project\node_mod
ules\node-sass\build\binding.vcxproj”(4) (默认目标)。
PrepareForBuild:
正在创建目录“Release\obj\binding\”。
正在创建目录“Release\obj\binding\binding.tlog\”。
InitializeBuildStatus:
正在创建“Release\obj\binding\binding.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。
ClCompile:
M:\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\CL.exe /c /I"C:\Users\á???3?\.node-gyp\5.2.0\include\node" /I"C:\Use
rs\á???3?\.node-gyp\5.2.0\src" /I"C:\Users\á???3?\.node-gyp\5.2.0\deps\uv\include" /I"C:\Users\á???3?\.node-gyp\5.2.0
\deps\v8\include" /I..\..\nan /I..\src\libsass\include /Zi /nologo /W3 /WX- /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODU
LE_NAME=binding /D USING_UV_SHARED=1 /D USING_V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D WIN32 /D _CRT_SECURE_NO_DEP
RECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D BUILDING_NODE_EXTENSION /D _WINDLL /GF /Gm- /MT /GS /Gy /
fp:precise /Zc:wchar_t /Zc:forScope /GR- /Fo"Release\obj\binding\\" /Fd"Release\obj\binding\vc120.pdb" /Gd /TP /wd435
1 /wd4355 /wd4800 /wd4251 /errorReport:queue /MP ..\src\binding.cpp ..\src\create_string.cpp ..\src\custom_function_b
ridge.cpp ..\src\custom_importer_bridge.cpp ..\src\sass_context_wrapper.cpp ..\src\sass_types\boolean.cpp ..\src\sass
_types\color.cpp ..\src\sass_types\error.cpp ..\src\sass_types\factory.cpp ..\src\sass_types\list.cpp ..\src\sass_typ
es\map.cpp ..\src\sass_types\null.cpp ..\src\sass_types\number.cpp ..\src\sass_types\string.cpp "K:\vuejs\my-project\
node_modules\node-gyp\src\win_delay_load_hook.cc"
binding.cpp
create_string.cpp
custom_function_bridge.cpp
custom_importer_bridge.cpp
sass_context_wrapper.cpp
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or director
y (..\src\binding.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or director
y (..\src\create_string.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
boolean.cpp
color.cpp
error.cpp
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or director
y (..\src\custom_function_bridge.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
factory.cpp
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or director
y (..\src\custom_importer_bridge.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
list.cpp
map.cpp
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or director
y (..\src\sass_types\boolean.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or director
y (..\src\sass_types\color.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
null.cpp
number.cpp
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or director
y (..\src\sass_types\error.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
string.cpp
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or director
y (..\src\sass_types\factory.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
win_delay_load_hook.cc
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or director
y (..\src\sass_types\list.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or director
y (..\src\sass_types\map.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or director
y (..\src\sass_types\number.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or director
y (..\src\sass_types\null.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or director
y (..\src\sass_types\string.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or director
y (..\src\sass_context_wrapper.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
已完成生成项目“K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj”(默认目标)的操作 - 失败。
已完成生成项目“K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj.metaproj”(默认目标)的操作 - 失败。
已完成生成项目“K:\vuejs\my-project\node_modules\node-sass\build\binding.sln”(默认目标)的操作 - 失败。
生成失败。
“K:\vuejs\my-project\node_modules\node-sass\build\binding.sln”(默认目标) (1) ->
“K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj.metaproj”(默认目标) (2) ->
“K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj”(默认目标) (3) ->
(ClCompile 目标) ->
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
..\..\src\libsass\src\bind.cpp(175): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 [K:\vuejs\my-project\node_modules
\node-sass\build\src\libsass.vcxproj]
..\..\src\libsass\src\json.cpp(26): warning C4005: “_CRT_NONSTDC_NO_DEPRECATE”: 宏重定义 [K:\vuejs\my-project\node_module
s\node-sass\build\src\libsass.vcxproj]
..\..\src\libsass\src\sass2scss.cpp(9): warning C4005: “_CRT_NONSTDC_NO_DEPRECATE”: 宏重定义 [K:\vuejs\my-project\node_mo
dules\node-sass\build\src\libsass.vcxproj]
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [K:\vuejs\my-project\node_modules\node-sass\build\src\libsass.vcxproj]
“K:\vuejs\my-project\node_modules\node-sass\build\binding.sln”(默认目标) (1) ->
“K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj.metaproj”(默认目标) (2) ->
“K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj”(默认目标) (4) ->
(ClCompile 目标) ->
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or direct
ory (..\src\binding.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or direct
ory (..\src\create_string.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or direct
ory (..\src\custom_function_bridge.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or direct
ory (..\src\custom_importer_bridge.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or direct
ory (..\src\sass_types\boolean.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or direct
ory (..\src\sass_types\color.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or direct
ory (..\src\sass_types\error.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or direct
ory (..\src\sass_types\factory.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or direct
ory (..\src\sass_types\list.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or direct
ory (..\src\sass_types\map.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or direct
ory (..\src\sass_types\number.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or direct
ory (..\src\sass_types\null.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or direct
ory (..\src\sass_types\string.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
K:\vuejs\my-project\node_modules\nan\nan.h(23): fatal error C1083: 无法打开包括文件: “node_version.h”: No such file or direct
ory (..\src\sass_context_wrapper.cpp) [K:\vuejs\my-project\node_modules\node-sass\build\binding.vcxproj]
15 个警告
14 个错误
已用时间 00:00:33.56
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (K:\vuejs\my-project\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:88:13)
gyp ERR! stack at ChildProcess.emit (events.js:173:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:201:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "K:\\nodejs\\node.exe" "K:\\vuejs\\my-project\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd K:\vuejs\my-project\node_modules\node-sass
gyp ERR! node -v v5.2.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
Build failed
postinstall:sass-graph ▄ ╢████████████████████████████████████████████ postinstall → rollbackFai ▄ ╢████████████████████████████████████████████postinstall → rollbackFai ▌ ╢████████████████████████████████████████████runTopLevelLifecycles ▄ ╢████████████████████████████████████████████ npm ERR! Windows_NT 10.0.10586
npm ERR! argv "K:\\nodejs\\node.exe" "K:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-sass" "--registry=http://registry.npm.taobao.org"
npm ERR! node v5.2.0
npm ERR! npm v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! node-sass@3.8.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.8.0 postinstall script 'node scripts/build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! K:\vuejs\my-project\npm-debug.log
K:\vuejs\my-project>
我该如何解决这个问题? 我怎么解决这个问题? 我该如何解决这个问题?
答案 0 :(得分:0)
对我来说,我必须从这里获得Python 2.7.x https://www.python.org/downloads/windows/ 并将其安装在C:\ Python27,然后运行
set PYTHON=C:\Python27\python.exe
在执行任何npm install命令之前,在npm中。
答案 1 :(得分:0)
这通常发生在节点二进制文件存在问题时
“K:\ vuejs \ my-project \ node_modules \ node-sass \ vendor \ win32-x64-47 \ binding.node”存在。
二进制问题: 错误:%1不是有效的Win32应用程序。
<强> K:\ vuejs \我的项目\ node_modules \节点萨斯\厂商\ Win32的x64-47 \ binding.node 强>
手动构建传入。
尝试清理node_modules文件夹&amp;重新构建你的构建