无法在 Windows 10 上安装 harp.js

Cannot install harp.js on Windows 10

我正在学习一些网络开发教程,但我无法在我的 Windows 10 电脑上安装 harp.jsnode.js v11.10.0

是否仍然可以安装 harp.js,它失败并出现很多错误消息。

我尝试过不同的 node.js 版本。似乎没有任何效果。

希望仍然可以修复这些错误消息,而无需等待更新版本的 harp..

我可以在不破坏其他所有内容的情况下更改依赖关系以使用较新的版本吗?例如,它试图从 Github 获取 SASS 依赖项,但 link 似乎不再起作用。

$ npm install -g harp
npm WARN deprecated connect@2.30.2: connect 2.x series is deprecated
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated classifier@0.1.0: Package no longer supported. Contact support@npmjs.com for more info.
C:\Users\deini\AppData\Roaming\npm\harp -> C:\Users\deini\AppData\Roaming\npm\node_modules\harp\bin\harp

> node-sass@4.9.3 install C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-67_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-67_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> node-sass@4.9.3 postinstall C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass
> node scripts/build.js

Building: C:\Program Files\nodejs2\node.exe C:\Users\deini\AppData\Roaming\npm\node_modules\harp\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 [ 'C:\Program Files\nodejs2\node.exe',
gyp verb cli   'C:\Users\deini\AppData\Roaming\npm\node_modules\harp\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.8.0
gyp info using node@11.10.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 (C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python2\n    at getNotFoundError (C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\which\which.js:13:12)\n    at F (C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\which\which.js:68:19)\n    at E (C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\which\which.js:80:29)\n    at C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\which\which.js:89:16\n    at C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\isexe\index.js:42:5\n    at C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\isexe\windows.js:36:5\n    at FSReqCallback.oncomplete (fs.js:158:21)',
gyp verb `which` failed   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 sys; print "2.7.15
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 11.10.0
gyp verb command install [ '11.10.0' ]
gyp verb install input version string "11.10.0"
gyp verb install installing version: 11.10.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: 11.10.0
gyp verb build dir attempting to create "build" dir: C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build
gyp verb build dir "build" dir needed to be created? C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build
gyp verb find vs2017 Found installation at: C:\Program Files (x86)\Microsoft Visual Studio17\Community
gyp verb find vs2017   - Found Microsoft.VisualStudio.VC.MSBuild.Base
gyp verb find vs2017   - Missing VC++ 2017 v141 toolset (x86,x64) (Microsoft.VisualStudio.Component.VC.Tools.x86.x64)
gyp verb find vs2017   - Missing a Windows SDK (Microsoft.VisualStudio.Component.Windows10SDK.* or Microsoft.VisualStudio.Component.Windows81SDK)
gyp verb find vs2017   - Some required components are missing, not using this installation
gyp verb find vs2017 Found installation at: C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise
gyp verb find vs2017   - Found Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop
gyp verb find vs2017   - Found Microsoft.VisualStudio.Component.VC.Tools.x86.x64
gyp verb find vs2017   - Found Microsoft.VisualStudio.VC.MSBuild.Base
gyp verb find vs2017   - Found Microsoft.VisualStudio.Component.Windows10SDK.17134
gyp verb find vs2017   - Using this installation with Windows 10 SDK
gyp verb find vs2017 using installation: C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\config.gypi
gyp verb config.gypi checking for gypi file: C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\config.gypi
gyp verb common.gypi checking for gypi file: C:\Users\deini\AppData\Roaming\npm\node_modules\harp\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 [ 'C:\Users\deini\AppData\Roaming\npm\node_modules\harp\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=2015',
gyp info spawn args   '-I',
gyp info spawn args   'C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-gyp\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\Users\deini\.node-gyp\11.10.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\deini\.node-gyp\11.10.0',
gyp info spawn args   '-Dnode_gyp_dir=C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\Users\deini\.node-gyp\11.10.0\<(target_arch)\node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\Users\deini\AppData\Roaming\npm\node_modules\harp\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\deini\.node-gyp.10.0
gyp verb found first Solution file build/binding.sln
gyp verb using MSBuild: C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\MSBuild.0\Bin\MSBuild.exe
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\MSBuild.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' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 24/02/2019 10:26:57.
Project "C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Release|x64".
Project "C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.sln" (1) is building "C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj" (2) on node 1 (default targets).
PrepareForBuild:
  Creating directory "Release\obj\binding\".
  Creating directory "Release\obj\binding\binding.tlog\".
InitializeBuildStatus:
  Creating "Release\obj\binding\binding.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\VC\Tools\MSVC.14.26428\bin\HostX64\x64\CL.exe /c /I"C:\Users\deini\.node-gyp.10.0\include\node" /I"C:\Users\deini\.node-gyp.10.0\src" /I"C:\Users\deini\.node-gyp.10.0\deps\openssl\config" /I"C:\Users\deini\.node-gyp.10.0\deps\openssl\openssl\include" /I"C:\Users\deini\.node-gyp.10.0\deps\uv\include" /I"C:\Users\deini\.node-gyp.10.0\deps\zlib" /I"C:\Users\deini\.node-gyp.10.0\deps\v8\include" /I..\..\nan /Z7 /nologo /W3 /WX- /diagnostics:classic /MP /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=binding /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 BUILDING_NODE_EXTENSION /D _WINDLL /GF /Gm- /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Fo"Release\obj\binding\" /Fd"Release\obj\binding\vc141.pdb" /Gd /TP /wd4351 /wd4355 /wd4800 /wd4251 /wd4275 /wd4244 /wd4267 /FC /errorReport:queue /Zc:threadSafeInit- ..\src\binding.cpp ..\src\create_string.cpp ..\src\custom_function_bridge.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_types\map.cpp ..\src\sass_types\null.cpp ..\src\sass_types\number.cpp ..\src\sass_types\string.cpp "C:\Users\deini\AppData\Roaming\npm\node_modules\harp\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
  boolean.cpp
  color.cpp
  error.cpp
c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\create_string.cpp(17): warning C4996: 'v8::String::Utf8Value::Utf8Value': was declared deprecatedc:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\custom_function_bridge.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\custom_function_bridge.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]

  c:\users\deini\.node-gyp.10.0\include\node\v8.h(2991): note: see declaration of 'v8::String::Utf8Value::Utf8Value'
c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\value.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\boolean.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
  factory.cpp
  list.cpp
c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\custom_importer_bridge.h(5): fatal error C1083: Cannot open include file: 'sass/functions.h': No such file or directory (compiling source file ..\src\custom_importer_bridge.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_context_wrapper.h(8): fatal error C1083: Cannot open include file: 'sass/context.h': No such file or directory (compiling source file ..\src\binding.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
  map.cpp
c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_context_wrapper.h(8): fatal error C1083: Cannot open include file: 'sass/context.h': No such file or directory (compiling source file ..\src\sass_context_wrapper.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
  null.cpp
  number.cpp
c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\value.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\error.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
  string.cpp
c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\value.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\color.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
  win_delay_load_hook.cc
c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\factory.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\factory.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\value.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\list.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\value.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\map.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\value.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\null.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\value.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\string.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\value.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\number.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
Done Building Project "C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj" (default targets) -- FAILED.
Done Building Project "C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.sln" (default targets) -- FAILED.

Build FAILED.

"C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.sln" (default target) (1) ->
"C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj" (default target) (2) ->
(ClCompile target) ->
  c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\create_string.cpp(17): warning C4996: 'v8::String::Utf8Value::Utf8Value': was declared deprecatedc:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\custom_function_bridge.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\custom_function_bridge.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]


"C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.sln" (default target) (1) ->
"C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj" (default target) (2) ->
(ClCompile target) ->
  c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\value.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\boolean.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
  c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\custom_importer_bridge.h(5): fatal error C1083: Cannot open include file: 'sass/functions.h': No such file or directory (compiling source file ..\src\custom_importer_bridge.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
  c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_context_wrapper.h(8): fatal error C1083: Cannot open include file: 'sass/context.h': No such file or directory (compiling source file ..\src\binding.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
  c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_context_wrapper.h(8): fatal error C1083: Cannot open include file: 'sass/context.h': No such file or directory (compiling source file ..\src\sass_context_wrapper.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
  c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\value.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\error.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
  c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\value.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\color.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
  c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\factory.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\factory.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
  c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\value.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\list.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
  c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\value.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\map.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
  c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\value.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\null.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
  c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\value.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\string.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]
  c:\users\deini\appdata\roaming\npm\node_modules\harp\node_modules\node-sass\src\sass_types\value.h(5): fatal error C1083: Cannot open include file: 'sass/values.h': No such file or directory (compiling source file ..\src\sass_types\number.cpp) [C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass\build\binding.vcxproj]

    1 Warning(s)
    12 Error(s)

Time Elapsed 00:00:03.17
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\MSBuild.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:197:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\Program Files\nodejs2\node.exe" "C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\deini\AppData\Roaming\npm\node_modules\harp\node_modules\node-sass
gyp ERR! node -v v11.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\harp\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.9.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.9.3 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!     C:\Users\deini\AppData\Roaming\npm-cache\_logs19-02-24T09_27_03_212Z-debug.log

确保 Node.js 和 npm 是最新的,要更新 Node.js 使用:

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

然后更新 npm 使用:

npm install -g npm

然后您可以尝试使用 npm install -g harp 再次安装 harp.js。 如果你 运行 对此有疑问,那么你可以尝试:

npm uninstall -g harp
npm cache clear
npm install -g harp

然而,404 来自 运行ning 在 scripts/install.js 中的某个东西,它试图从这个 Github 中得到一些东西,正如你所看到的 returns 404,所以你可能需要找一个备用镜像。 虽然你说你正在使用 Node.js v11.10.0 但 node-sass 的 v4.9.3 不支持该版本(如你所见 here),只是 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,所以我建议您这次卸载当前版本的节点并重新安装 LTS(目前为 v10.15.1)而不是当前版本。