RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / 问题 / 809065
Accepted
msupreme
msupreme
Asked:2020-04-04 02:19:55 +0000 UTC2020-04-04 02:19:55 +0000 UTC 2020-04-04 02:19:55 +0000 UTC

安装 Yarn (node-sass) 时出错

  • 772

我在安装 yarn install 包时在 Windows 上部署项目,我收到以下错误,告诉我如何解决这个问题?

$ yarn install
yarn install v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.1.1: The platform "win32" is incompatible with this module.
info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error D:\Work\Projects\blockchain-first-template\node_modules\node-sass: Command failed.
Exit code: 1
Command: C:\WINDOWS\system32\cmd.exe
Arguments: /d /s /c node scripts/build.js
Directory: D:\Work\Projects\blockchain-first-template\node_modules\node-sass
Output:
Building: C:\Program Files\nodejs\node.exe D:\Work\Projects\blockchain-first-template\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\\nodejs\\node.exe',
gyp verb cli   'D:\\Work\\Projects\\blockchain-first-template\\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.6.1
gyp info using node@9.7.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 (D:\Work\Projects\blockchain-first-template\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\Work\Projects\blockchain-first-template\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (D:\Work\Projects\blockchain-first-template\node_modules\which\which.js:80:29)
gyp verb `which` failed     at D:\Work\Projects\blockchain-first-template\node_modules\which\which.js:89:16
gyp verb `which` failed     at D:\Work\Projects\blockchain-first-template\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at D:\Work\Projects\blockchain-first-template\node_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 (D:\Work\Projects\blockchain-first-template\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\Work\Projects\blockchain-first-template\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (D:\Work\Projects\blockchain-first-template\node_modules\which\which.js:80:29)
gyp verb `which` failed     at D:\Work\Projects\blockchain-first-template\node_modules\which\which.js:89:16
gyp verb `which` failed     at D:\Work\Projects\blockchain-first-template\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at D:\Work\Projects\blockchain-first-template\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:170:21) 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.14\r\n"
gyp verb get node dir no --target version specified, falling back to host node version: 9.7.1
gyp verb command install [ '9.7.1' ]
gyp verb install input version string "9.7.1"
gyp verb install installing version: 9.7.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.7.1
gyp verb build dir attempting to create "build" dir: D:\Work\Projects\blockchain-first-template\node_modules\node-sass\build
gyp verb build dir "build" dir needed to be created? D:\Work\Projects\blockchain-first-template\node_modules\node-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: D:\Work\Projects\blockchain-first-template\node_modules\node-sass\build\config.gypigyp verb config.gypi checking for gypi file: D:\Work\Projects\blockchain-first-template\node_modules\node-sass\config.gypi
gyp verb common.gypi checking for gypi file: D:\Work\Projects\blockchain-first-template\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 [ 'D:\\Work\\Projects\\blockchain-first-template\\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   'D:\\Work\\Projects\\blockchain-first-template\\node_modules\\node-sass\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\Work\\Projects\\blockchain-first-template\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Supreme\\.node-gyp\\9.7.1\\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\\Supreme\\.node-gyp\\9.7.1',
gyp info spawn args   '-Dnode_gyp_dir=D:\\Work\\Projects\\blockchain-first-template\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=D:\\Work\\Projects\\blockchain-first-template\\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   'D:\\Work\\Projects\\blockchain-first-template\\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\Supreme\.node-gyp\9.7.1
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\Supreme\.node-gyp\9.7.1\Release\node.lib
gyp info spawn C:\Program Files (x86)\MSBuild\14.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".
Сборка начата 03.04.2018 21:15:14.
Проект "D:\Work\Projects\blockchain-first-template\node_modules\node-sass\build\binding.sln" в узле 1 (целевые объекты по умолчанию).
ValidateSolutionConfiguration:
  Создание конфигурации решения "Release|x64".
MSBUILD : error MSB3428: Загрузка компонента Visual C++ "VCBuild.exe" невозможна. Способы решения проблемы: 1) установка .NET Framework 2.0 SDK, 2) установка Microsoft Visual Studio 2005 или 3) указание адреса компонента в системном пути, если компонент установлен в другом месте.  [D:\Work\Projects\blockchain-first-template\node_modules\node-sass\build\binding.sln]
Сборка проекта "D:\Work\Projects\blockchain-first-template\node_modules\node-sass\build\binding.sln" завершена (целевые объекты по умолчанию) с ошибкой.

Ошибка сборки.

"D:\Work\Projects\blockchain-first-template\node_modules\node-sass\build\binding.sln" (целевой объект по умолчанию) (1) ->
(Целевой объект _src_\libsass) ->
  MSBUILD : error MSB3428: Загрузка компонента Visual C++ "VCBuild.exe" невозможна. Способы решения проблемы: 1) установка .NET Framework 2.0 SDK, 2) установка Microsoft Visual Studio 2005 или 3) указание адреса компонента в системном пути, если компонент установлен в другом месте.  [D:\Work\Projects\blockchain-first-template\node_modules\node-sass\build\binding.sln]

    Предупреждений: 0
    Ошибок: 1

Затраченное время: 00:00:00.90
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:\Work\Projects\blockchain-first-template\node_modules\node-gyp\lib\build.js:285:23)
gyp ERR! stack     at ChildProcess.emit (events.js:127:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\Work\\Projects\\blockchain-first-template\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd D:\Work\Projects\blockchain-first-template\node_modules\node-sass
gyp ERR! node -v v9.7.1
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok
Build failed with error code: 1
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

node.js
  • 1 1 个回答
  • 10 Views

1 个回答

  • Voted
  1. Best Answer
    msupreme
    2020-04-08T16:08:05Z2020-04-08T16:08:05Z

    您需要为您的操作系统安装 Visual Studio 2015。

    • 0

相关问题

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    是否可以在 C++ 中继承类 <---> 结构?

    • 2 个回答
  • Marko Smith

    这种神经网络架构适合文本分类吗?

    • 1 个回答
  • Marko Smith

    为什么分配的工作方式不同?

    • 3 个回答
  • Marko Smith

    控制台中的光标坐标

    • 1 个回答
  • Marko Smith

    如何在 C++ 中删除类的实例?

    • 4 个回答
  • Marko Smith

    点是否属于线段的问题

    • 2 个回答
  • Marko Smith

    json结构错误

    • 1 个回答
  • Marko Smith

    ServiceWorker 中的“获取”事件

    • 1 个回答
  • Marko Smith

    c ++控制台应用程序exe文件[重复]

    • 1 个回答
  • Marko Smith

    按多列从sql表中选择

    • 1 个回答
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Suvitruf - Andrei Apanasik 什么是空? 2020-08-21 01:48:09 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5