title: How do I fix this super long error in Yarn?
body: <p>How do I fix this long error in Yarn when I try to install the dependencies and modules? I'm not even sure how to interpret it. I think it's giving me 3 different errors, but I don't know which to focus on first. One 'error' (?) says it could not find Python2, but then it did find it later. I do have \python2\python.exe and \python3\python.exe, but Python 3 is first in my path. The last line says something is optional, but it didn't clarify which module it was talking about, when there appears to be several errors. One 'error' refers to Microsoft SDK, but the project was created by someone on a Macintosh! Why would it depend on Windows?</p>
  
  <p>I think I dislike Yarn already. It's excessively verbose, unnecessarily repetitive with 'gyp verb' and way too many backslashes, and completely vague.</p>
  
  <pre><code>C:\Users\Chloe\workspace\catalyst_research&gt;yarn install
  yarn install v1.5.1
  [1/5] Validating package.json...
  [2/5] Resolving packages...
  [3/5] Fetching packages...
  info fsevents@1.1.2: The platform "win32" is incompatible with this module.
  info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
  [4/5] Linking dependencies...
  [5/5] Building fresh packages...
  [1/2] ? node-zopfli: Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  [2/2] ? node-sass: Build failed with error code: 1
  [-/2] ? waiting...
  [-/2] ? waiting...
  error An unexpected error occurred: "C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-sass: Command failed.
  Exit code: 1
  Command: C:\\windows\\system32\\cmd.exe
  Arguments: /d /s /c node scripts/build.js
  Directory: C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-sass
  Output:
  Building: C:\\Program Files\
  odejs\
  ode.exe C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-gyp\\bin\
  ode-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\\\
  odejs\\\
  ode.exe',
  gyp verb cli   'C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-gyp\\\\bin\\\
  ode-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.6.2
  gyp info using node@9.10.1 | 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\\Chloe\\workspace\\catalyst_research\
  ode_modules\\which\\which.js:13:12)
  gyp verb `which` failed     at F (C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\\which\\which.js:68:19)
  gyp verb `which` failed     at E (C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\\which\\which.js:80:29)
  gyp verb `which` failed     at C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\\which\\which.js:89:16
  gyp verb `which` failed     at C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\\isexe\\index.js:42:5
  gyp verb `which` failed     at C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\\isexe\\windows.js:36:5
  gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:170:21)
  gyp verb `which` failed  python2 { Error: not found: python2
  gyp verb `which` failed     at getNotFoundError (C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\\which\\which.js:13:12)
  gyp verb `which` failed     at F (C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\\which\\which.js:68:19)
  gyp verb `which` failed     at E (C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\\which\\which.js:80:29)
  gyp verb `which` failed     at C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\\which\\which.js:89:16
  gyp verb `which` failed     at C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\\isexe\\index.js:42:5
  gyp verb `which` failed     at C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\\isexe\\windows.js:36:5
  gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:170:21)
  gyp verb `which` failed   stack: 'Error: not found: python2\
      at getNotFoundError (C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\\which\\\\which.js:13:12)\
      at F (C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\\which\\\\which.js:68:19)\
      at E (C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\\which\\\\which.js:80:29)\
      at C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\\which\\\\which.js:89:16\
      at C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\\isexe\\\\index.js:42:5\
      at C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\\isexe\\\\windows.js:36:5\
      at FSReqWrap.oncomplete (fs.js:170: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:\\Python36\\python.EXE
  gyp verb check python version `C:\\Python36\\python.EXE -c \"import platform; print(platform.python_version());\"` returned: \"3.6.5\\r\
  \"
  gyp verb could not find \"C:\\Python36\\python.EXE\". checking python launcher
  gyp verb check python launcher python executable found: \"C:\\\\Python27\\\\python.exe\"
  gyp verb check python version `C:\\Python27\\python.exe -c \"import platform; print(platform.python_version());\"` returned: \"2.7.14\\r\
  \"
  gyp verb get node dir no --target version specified, falling back to host node version: 9.10.1
  gyp verb command install [ '9.10.1' ]
  gyp verb install input version string \"9.10.1\"
  gyp verb install installing version: 9.10.1
  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: 9.10.1
  gyp verb build dir attempting to create \"build\" dir: C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-sass\\build
  gyp verb build dir \"build\" dir needed to be created? C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-sass\\build
  gyp verb Not using VS2017: Could not use PowerShell to find VS2017
  gyp verb build/config.gypi creating config file
  gyp verb build/config.gypi writing out config file: C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-sass\\build\\config.gypi
  gyp verb config.gypi checking for gypi file: C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-sass\\config.gypi
  gyp verb common.gypi checking for gypi file: C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-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\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-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   'C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-sass\\\\build\\\\config.gypi',
  gyp info spawn args   '-I',
  gyp info spawn args   'C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-gyp\\\\addon.gypi',
  gyp info spawn args   '-I',
  gyp info spawn args   'C:\\\\Users\\\\Chloe\\\\.node-gyp\\\\9.10.1\\\\include\\\
  ode\\\\common.gypi',
  gyp info spawn args   '-Dlibrary=shared_library',
  gyp info spawn args   '-Dvisibility=default',
  gyp info spawn args   '-Dnode_root_dir=C:\\\\Users\\\\Chloe\\\\.node-gyp\\\\9.10.1',
  gyp info spawn args   '-Dnode_gyp_dir=C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-gyp',
  gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\Chloe\\\\.node-gyp\\\\9.10.1\\\\&lt;(target_arch)\\\
  ode.lib',
  gyp info spawn args   '-Dmodule_root_dir=C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-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\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-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\\Chloe\\.node-gyp\\9.10.1
  gyp verb found first Solution file build/binding.sln
  gyp verb could not find \"msbuild.exe\" in PATH - finding location in registry
  gyp info spawn C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\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 3/30/2018 10:40:15 PM.
  Project \"C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-sass\\build\\binding.sln\" on node 1 (default targets).
  ValidateSolutionConfiguration:
    Building solution configuration \"Release|x64\".
  MSBUILD : error MSB3411: Could not load the Visual C++ component \"VCBuild.exe\". If the component is not installed, either 1) install the Microsoft Windows SDK for Windows Server
  2008 and .NET Framework 3.5, or 2) install Microsoft Visual Studio 2008.  [C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-sass\\build\\binding.sln]
  Done Building Project \"C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-sass\\build\\binding.sln\" (default targets) -- FAILED.
  
  Build FAILED.
  
  \"C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-sass\\build\\binding.sln\" (default target) (1) -&gt;
  (libsass target) -&gt;
    MSBUILD : error MSB3411: Could not load the Visual C++ component \"VCBuild.exe\". If the component is not installed, either 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5, or 2) install Microsoft Visual Studio 2008.  [C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-sass\\build\\binding.sln]
  
      0 Warning(s)
      1 Error(s)
  
  Time Elapsed 00:00:01.02
  gyp ERR! build error
  gyp ERR! stack Error: `C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\msbuild.exe` failed with exit code: 1
  gyp ERR! stack     at ChildProcess.onExit (C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-gyp\\lib\\build.js:258:23)
  gyp ERR! stack     at ChildProcess.emit (events.js:180:13)
  gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
  gyp ERR! System Windows_NT 6.3.9600
  gyp ERR! command \"C:\\\\Program Files\\\
  odejs\\\
  ode.exe\" \"C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-gyp\\\\bin\\\
  ode-gyp.js\" \"rebuild\" \"--verbose\" \"--libsass_ext=\" \"--libsass_cflags=\" \"--libsass_ldflags=\" \"--libsass_library=\"
  gyp ERR! cwd C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-sass
  gyp ERR! node -v v9.10.1
  gyp ERR! node-gyp -v v3.6.2
  
  
  
  
  warning Error running install script for optional dependency: "C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-zopfli: Command failed.
  Exit code: 1
  Command: C:\\windows\\system32\\cmd.exe
  Arguments: /d /s /c node-pre-gyp install --fallback-to-build
  Directory: C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-zopfli
  Output:
  node-pre-gyp info it worked if it ends with ok
  node-pre-gyp info using node-pre-gyp@0.6.36
  node-pre-gyp info using node@9.10.1 | win32 | x64
  node-pre-gyp info check checked for \"C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-zopfli\\lib\\binding\
  ode-v59-win32-x64\\zopfli.node\" (not found)
  node-pre-gyp http GET https://node-zopfli.s3.amazonaws.com/Release/zopfli-v2.0.2-node-v59-win32-x64.tar.gz
  node-pre-gyp http 403 https://node-zopfli.s3.amazonaws.com/Release/zopfli-v2.0.2-node-v59-win32-x64.tar.gz
  node-pre-gyp ERR! Tried to download(403): https://node-zopfli.s3.amazonaws.com/Release/zopfli-v2.0.2-node-v59-win32-x64.tar.gz
  node-pre-gyp ERR! Pre-built binaries not found for node-zopfli@2.0.2 and node@9.10.1 (node-v59 ABI) (falling back to source compile with node-gyp)
  node-pre-gyp http 403 status code downloading tarball https://node-zopfli.s3.amazonaws.com/Release/zopfli-v2.0.2-node-v59-win32-x64.tar.gz
  gyp info it worked if it ends with ok
  gyp info using node-gyp@3.6.2
  gyp info using node@9.10.1 | win32 | x64
  gyp info ok
  gyp info it worked if it ends with ok
  gyp info using node-gyp@3.6.2
  gyp info using node@9.10.1 | win32 | x64
  gyp info spawn C:\\Python27\\python.exe
  gyp info spawn args [ 'C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-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   'C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-zopfli\\\\build\\\\config.gypi',
  gyp info spawn args   '-I',
  gyp info spawn args   'C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-gyp\\\\addon.gypi',
  gyp info spawn args   '-I',
  gyp info spawn args   'C:\\\\Users\\\\Chloe\\\\.node-gyp\\\\9.10.1\\\\include\\\
  ode\\\\common.gypi',
  gyp info spawn args   '-Dlibrary=shared_library',
  gyp info spawn args   '-Dvisibility=default',
  gyp info spawn args   '-Dnode_root_dir=C:\\\\Users\\\\Chloe\\\\.node-gyp\\\\9.10.1',
  gyp info spawn args   '-Dnode_gyp_dir=C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-gyp',
  gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\Chloe\\\\.node-gyp\\\\9.10.1\\\\&lt;(target_arch)\\\
  ode.lib',
  gyp info spawn args   '-Dmodule_root_dir=C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-zopfli',
  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\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-zopfli\\\\build',
  gyp info spawn args   '-Goutput_dir=.' ]
  gyp info ok
  gyp info it worked if it ends with ok
  gyp info using node-gyp@3.6.2
  gyp info using node@9.10.1 | win32 | x64
  gyp info spawn C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\msbuild.exe
  gyp info spawn args [ 'build/binding.sln',
  gyp info spawn args   '/clp:Verbosity=minimal',
  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.
  MSBUILD : error MSB3411: Could not load the Visual C++ component \"VCBuild.exe\". If the component is not installed, either 1) install the Microsoft Windows SDK for Windows Server
  2008 and .NET Framework 3.5, or 2) install Microsoft Visual Studio 2008.  [C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-zopfli\\build\\binding.sln]
  gyp ERR! build error
  gyp ERR! stack Error: `C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\msbuild.exe` failed with exit code: 1
  gyp ERR! stack     at ChildProcess.onExit (C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-gyp\\lib\\build.js:258:23)
  gyp ERR! stack     at ChildProcess.emit (events.js:180:13)
  gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
  gyp ERR! System Windows_NT 6.3.9600
  gyp ERR! command \"C:\\\\Program Files\\\
  odejs\\\
  ode.exe\" \"C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-gyp\\\\bin\\\
  ode-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-zopfli\\\\lib\\\\binding\\\
  ode-v59-win32-x64\\\\zopfli.node\" \"--module_name=zopfli\" \"--module_path=C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-zopfli\\\\lib\\\\binding\\\
  ode-v59-win32-x64\"
  gyp ERR! cwd C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-zopfli
  gyp ERR! node -v v9.10.1
  gyp ERR! node-gyp -v v3.6.2
  gyp ERR! not ok
  node-pre-gyp ERR! build error
  node-pre-gyp ERR! stack Error: Failed to execute 'C:\\Program Files\
  odejs\
  ode.exe C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-gyp\\bin\
  ode-gyp.js build --fallback-to-build --module=C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-zopfli\\lib\\binding\
  ode-v59-win32-x64\\zopfli.node --module_name=zopfli --module_path=C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-zopfli\\lib\\binding\
  ode-v59-win32-x64' (1)
  node-pre-gyp ERR! stack     at ChildProcess.&lt;anonymous&gt; (C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-pre-gyp\\lib\\util\\compile.js:83:29)
  node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:180:13)
  node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:936:16)
  node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
  node-pre-gyp ERR! System Windows_NT 6.3.9600
  node-pre-gyp ERR! command \"C:\\\\Program Files\\\
  odejs\\\
  ode.exe\" \"C:\\\\Users\\\\Chloe\\\\workspace\\\\catalyst_research\\\
  ode_modules\\\
  ode-pre-gyp\\\\bin\\\
  ode-pre-gyp\" \"install\" \"--fallback-to-build\"
  node-pre-gyp ERR! cwd C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-zopfli
  node-pre-gyp ERR! node -v v9.10.1
  node-pre-gyp ERR! node-pre-gyp -v v0.6.36
  node-pre-gyp ERR! not ok
  Failed to execute 'C:\\Program Files\
  odejs\
  ode.exe C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-gyp\\bin\
  ode-gyp.js build --fallback-to-build --module=C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-zopfli\\lib\\binding\
  ode-v59-win32-x64\\zopfli.node --module_name=zopfli --module_path=C:\\Users\\Chloe\\workspace\\catalyst_research\
  ode_modules\
  ode-zopfli\\lib\\binding\
  ode-v59-win32-x64' (1)"
  info This module is OPTIONAL, you can safely ignore this error
  </code></pre>