yarn install 报错 gyp verb `which` failed python2 Error: not found: python2

本文详细解析了使用Yarn启动项目时遇到的错误,包括node-sass模块的构建失败,Python环境变量配置问题,以及Visual C++组件缺失等常见问题。提供了具体的错误日志分析,以及解决这些问题的步骤,如安装Python和Visual Studio组件,更新Node.js版本,和使用中国镜像源等。
部署运行你感兴趣的模型镜像

yarn启动项目时报错
node-sass: Command failed.

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 (F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\which\which.js:80:29)
gyp verb `which` failed     at F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\which\which.js:89:16
gyp verb `which` failed     at F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:154:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\which\which.js:80:29)
gyp verb `which` failed     at F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\which\which.js:89:16
gyp verb `which` failed     at F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:154:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python2\n    at getNotFoundError (F:\\company_project\\xiexin\\trunk\\app\\xxsdapp\\node_modules\\which\\which.js:13:12)\n    at F (F:\\com
pany_project\\xiexin\\trunk\\app\\xxsdapp\\node_modules\\which\\which.js:68:19)\n    at E (F:\\company_project\\xiexin\\trunk\\app\\xxsdapp\\node_modules\\which\\which.js:80:29)\n    at
 F:\\company_project\\xiexin\\trunk\\app\\xxsdapp\\node_modules\\which\\which.js:89:16\n    at F:\\company_project\\xiexin\\trunk\\app\\xxsdapp\\node_modules\\isexe\\index.js:42:5\n
at F:\\company_project\\xiexin\\trunk\\app\\xxsdapp\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:154: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: 10.15.0
gyp verb command install [ '10.15.0' ]
gyp verb install input version string "10.15.0"
gyp verb install installing version: 10.15.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: 10.15.0
gyp verb build dir attempting to create "build" dir: F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\node-sass\build
gyp verb build dir "build" dir needed to be created? F:\company_project\xiexin\trunk\app\xxsdapp\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: F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\node-sass\build\config.gypi
gyp verb config.gypi checking for gypi file: F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\node-sass\config.gypi
gyp verb common.gypi checking for gypi file: F:\company_project\xiexin\trunk\app\xxsdapp\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 [ 'F:\\company_project\\xiexin\\trunk\\app\\xxsdapp\\node_modules\\node-Dnode_gyp_dir=F:\\company_project\\xiexin\\trunk\\app\\xxsdapp\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\Users\\curry\\.node-gyp\\10.15.0\\<(target_arch)\\node.lib',

在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
生成启动时间为 2019/2/21 9:56:01。
节点 1 上的项目“F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\node-sass\build\binding.sln”(默认目标)。
ValidateSolutionConfiguration:
  正在生成解决方案配置“Release|x64”。
MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”。要解决此问题,1) 安装 .NET Framework 2.0 SDK;2) 安装 Microsoft Visual Studio 2005;或 3) 如果将该组件安装到了其他位置
,请将其位置添加到系统路径中。 [F:\company_project\x
iexin\trunk\app\xxsdapp\node_modules\node-sass\build\binding.sln]
已完成生成项目“F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\node-sass\build\binding.sln”(默认目标)的操作 - 失败。


生成失败。

“F:\company_project\xiexin\trunk\app\xxsdapp\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) 如果将该组件安装到了其他位
置,请将其位置添加到系统路径中。 [F:\company_project
\xiexin\trunk\app\xxsdapp\node_modules\node-sass\build\binding.sln]

    0 个警告
    1 个错误

已用时间 00:00:00.27
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 (F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "F:\\company_project\\xiexin\\trunk\\app\\xxsdapp\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=
" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd F:\company_project\xiexin\trunk\app\xxsdapp\node_modules\node-sass
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

解决办法

npm install -g mirror-config-china --registry=http://registry.npm.taobao.org
npm install node-sass
yarn install

您可能感兴趣的与本文相关的镜像

Python3.9

Python3.9

Conda
Python

Python 是一种高级、解释型、通用的编程语言,以其简洁易读的语法而闻名,适用于广泛的应用,包括Web开发、数据分析、人工智能和自动化脚本

PS C:\Users\Administrator\Desktop\vue\project-one> npm i sass-loader@7 node-sass@4 -S npm WARN deprecated osenv@0.1.5: This package is no longer supported. npm WARN deprecated npmlog@4.1.2: This package is no longer supported. npm WARN deprecated glob@7.1.7: Glob versions prior to v9 are no longer supported npm WARN deprecated are-we-there-yet@1.1.7: This package is no longer supported. npm WARN deprecated gauge@2.7.4: This package is no longer supported. npm WARN deprecated fstream@1.0.12: This package is no longer supported. npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap. npm WARN deprecated node-sass@4.14.1: Node Sass is no longer supported. Please use sass or sass-embedded instead. npm ERR! code 1 npm ERR! path C:\Users\Administrator\Desktop\vue\project-one\node_modules\node-sass npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js npm ERR! Building: E:\nodejs\node.exe C:\Users\Administrator\Desktop\vue\project-one\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= npm ERR! gyp info it worked if it ends with ok npm ERR! gyp verb cli [ npm ERR! gyp verb cli 'E:\nodejs\node.exe', npm ERR! gyp verb cli 'C:\Users\Administrator\Desktop\vue\project-one\node_modules\node-gyp\bin\node-gyp.js', npm ERR! gyp verb cli 'rebuild', npm ERR! gyp verb cli '--verbose', npm ERR! gyp verb cli '--libsass_ext=', npm ERR! gyp verb cli '--libsass_cflags=', npm ERR! gyp verb cli '--libsass_ldflags=', npm ERR! gyp verb cli '--libsass_library=' npm ERR! gyp verb cli ] npm ERR! gyp info using node-gyp@3.8.0 npm ERR! gyp info using node@16.20.2 | win32 | x64 npm ERR! gyp verb command rebuild [] npm ERR! gyp verb command clean [] npm ERR! gyp verb clean removing "build" directory npm ERR! gyp verb command configure [] npm ERR! gyp verb check python checking for Python executable "python2" in the PATH npm ERR! gyp verb which failed Error: not found: python2 npm ERR! gyp verb which failed at getNotFoundError (C:\Users\Administrator\Desktop\vue\project-one\node_modules\which\which.js:13:12) npm ERR! gyp verb which failed at F (C:\Users\Administrator\Desktop\vue\project-one\node_modules\which\which.js:68:19) npm ERR! gyp verb which failed at E (C:\Users\Administrator\Desktop\vue\project-one\node_modules\which\which.js:80:29) npm ERR! gyp verb which failed at C:\Users\Administrator\Desktop\vue\project-one\node_modules\which\which.js:89:16 npm ERR! gyp verb which failed at C:\Users\Administrator\Desktop\vue\project-one\node_modules\isexe\index.js:42:5 npm ERR! gyp verb which failed at C:\Users\Administrator\Desktop\vue\project-one\node_modules\isexe\windows.js:36:5 npm ERR! gyp verb which failed at FSReqCallback.oncomplete (node:fs:202:21) npm ERR! gyp verb which failed python2 Error: not found: python2 npm ERR! gyp verb which failed at getNotFoundError (C:\Users\Administrator\Desktop\vue\project-one\node_modules\which\which.js:13:12) npm ERR! gyp verb which failed at F (C:\Users\Administrator\Desktop\vue\project-one\node_modules\which\which.js:68:19) npm ERR! gyp verb which failed at E (C:\Users\Administrator\Desktop\vue\project-one\node_modules\which\which.js:80:29) npm ERR! gyp verb which failed at C:\Users\Administrator\Desktop\vue\project-one\node_modules\which\which.js:89:16 npm ERR! gyp verb which failed at C:\Users\Administrator\Desktop\vue\project-one\node_modules\isexe\index.js:42:5 npm ERR! gyp verb which failed at C:\Users\Administrator\Desktop\vue\project-one\node_modules\isexe\windows.js:36:5 npm ERR! gyp verb which failed at FSReqCallback.oncomplete (node:fs:202:21) { npm ERR! gyp verb which failed code: 'ENOENT' npm ERR! gyp verb which failed } npm ERR! gyp verb check python checking for Python executable "python" in the PATH npm ERR! gyp verb which failed Error: not found: python npm ERR! gyp verb which failed at getNotFoundError (C:\Users\Administrator\Desktop\vue\project-one\node_modules\which\which.js:13:12) npm ERR! gyp verb which failed at F (C:\Users\Administrator\Desktop\vue\project-one\node_modules\which\which.js:68:19) npm ERR! gyp verb which failed at E (C:\Users\Administrator\Desktop\vue\project-one\node_modules\which\which.js:80:29) npm ERR! gyp verb which failed at C:\Users\Administrator\Desktop\vue\project-one\node_modules\which\which.js:89:16 npm ERR! gyp verb which failed at C:\Users\Administrator\Desktop\vue\project-one\node_modules\isexe\index.js:42:5 npm ERR! gyp verb which failed at C:\Users\Administrator\Desktop\vue\project-one\node_modules\isexe\windows.js:36:5 npm ERR! gyp verb which failed at FSReqCallback.oncomplete (node:fs:202:21) npm ERR! gyp verb which failed python Error: not found: python npm ERR! gyp verb which failed at getNotFoundError (C:\Users\Administrator\Desktop\vue\project-one\node_modules\which\which.js:13:12) npm ERR! gyp verb which failed at F (C:\Users\Administrator\Desktop\vue\project-one\node_modules\which\which.js:68:19) npm ERR! gyp verb which failed at E (C:\Users\Administrator\Desktop\vue\project-one\node_modules\which\which.js:80:29) npm ERR! gyp verb which failed at C:\Users\Administrator\Desktop\vue\project-one\node_modules\which\which.js:89:16 npm ERR! gyp verb which failed at C:\Users\Administrator\Desktop\vue\project-one\node_modules\isexe\index.js:42:5 npm ERR! gyp verb which failed at C:\Users\Administrator\Desktop\vue\project-one\node_modules\isexe\windows.js:36:5 npm ERR! gyp verb which failed at FSReqCallback.oncomplete (node:fs:202:21) { npm ERR! gyp verb which failed code: 'ENOENT' npm ERR! gyp verb which failed } npm ERR! gyp verb could not find "python". checking python launcher npm ERR! gyp verb could not find "python". guessing location npm ERR! gyp verb ensuring that file exists: C:\Python27\python.exe npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. npm ERR! gyp ERR! stack at PythonFinder.failNoPython (C:\Users\Administrator\Desktop\vue\project-one\node_modules\node-gyp\lib\configure.js:484:19) npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\Administrator\Desktop\vue\project-one\node_modules\node-gyp\lib\configure.js:509:16) npm ERR! gyp ERR! stack at callback (C:\Users\Administrator\Desktop\vue\project-one\node_modules\graceful-fs\polyfills.js:306:20) npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:202:21) npm ERR! gyp ERR! System Windows_NT 10.0.19045 npm ERR! gyp ERR! command "E:\nodejs\node.exe" "C:\Users\Administrator\Desktop\vue\project-one\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" npm ERR! gyp ERR! cwd C:\Users\Administrator\Desktop\vue\project-one\node_modules\node-sass npm ERR! gyp ERR! node -v v16.20.2 npm ERR! gyp ERR! node-gyp -v v3.8.0 npm ERR! gyp ERR! not ok npm ERR! Build failed with error code: 1 npm ERR! A complete log of this run can be found in: npm ERR! E:\nvm\v16.20.2\node_cache_logs\2025-08-08T10_57_34_321Z-debug-0.log PS C:\Users\Administrator\Desktop\vue\project-one>
08-09
npm ERR! code 1 npm ERR! path C:\Users\Y\Desktop\briup-pts\node_modules\node-sass npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js npm ERR! Building: D:\aiqianduan\nodejs\node.exe C:\Users\Y\Desktop\briup-pts\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= npm ERR! gyp info it worked if it ends with ok npm ERR! gyp verb cli [ npm ERR! gyp verb cli 'D:\\aiqianduan\\nodejs\\node.exe', npm ERR! gyp verb cli 'C:\\Users\\Y\\Desktop\\briup-pts\\node_modules\\node-gyp\\bin\\node-gyp.js', npm ERR! gyp verb cli 'rebuild', npm ERR! gyp verb cli '--verbose', npm ERR! gyp verb cli '--libsass_ext=', npm ERR! gyp verb cli '--libsass_cflags=', npm ERR! gyp verb cli '--libsass_ldflags=', npm ERR! gyp verb cli '--libsass_library=' npm ERR! gyp verb cli ] npm ERR! gyp info using node-gyp@3.8.0 npm ERR! gyp info using node@18.19.0 | win32 | x64 npm ERR! gyp verb command rebuild [] npm ERR! gyp verb command clean [] npm ERR! gyp verb clean removing "build" directory npm ERR! gyp verb command configure [] npm ERR! gyp verb check python checking for Python executable "python2" in the PATH npm ERR! gyp verb `which` failed Error: not found: python2 npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Y\Desktop\briup-pts\node_modules\which\which.js:13:12) npm ERR! gyp verb `which` failed at F (C:\Users\Y\Desktop\briup-pts\node_modules\which\which.js:68:19) npm ERR! gyp verb `which` failed at E (C:\Users\Y\Desktop\briup-pts\node_modules\which\which.js:80:29) npm ERR! gyp verb `which` failed at C:\Users\Y\Desktop\briup-pts\node_modules\which\which.js:89:16 npm ERR! gyp verb `which` failed at C:\Users\Y\Desktop\briup-pts\node_modules\isexe\index.js:42:5 npm ERR! gyp verb `which` failed at C:\Users\Y\Desktop\briup-pts\node_modules\isexe\windows.js:36:5 npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:202:21) npm ERR! gyp verb `which` failed python2 Error: not found: python2 npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Y\Desktop\briup-pts\node_modules\which\which.js:13:12) npm ERR! gyp verb `which` failed at F (C:\Users\Y\Desktop\briup-pts\node_modules\which\which.js:68:19) npm ERR! gyp verb `which` failed at E (C:\Users\Y\Desktop\briup-pts\node_modules\which\which.js:80:29) npm ERR! gyp verb `which` failed at C:\Users\Y\Desktop\briup-pts\node_modules\which\which.js:89:16 npm ERR! gyp verb `which` failed at C:\Users\Y\Desktop\briup-pts\node_modules\isexe\index.js:42:5 npm ERR! gyp verb `which` failed at C:\Users\Y\Desktop\briup-pts\node_modules\isexe\windows.js:36:5 npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:202:21) { npm ERR! gyp verb `which` failed code: 'ENOENT' npm ERR! gyp verb `which` failed } npm ERR! gyp verb check python checking for Python executable "python" in the PATH npm ERR! gyp verb `which` succeeded python C:\Python313\python.EXE npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Command failed: C:\Python313\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3]; npm ERR! gyp ERR! stack File "<string>", line 1 npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3]; npm ERR! gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ npm ERR! gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? npm ERR! gyp ERR! stack npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:422:12) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:517:28) npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1098:16) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:303:5) npm ERR! gyp ERR! System Windows_NT 10.0.26100 npm ERR! gyp ERR! command "D:\\aiqianduan\\nodejs\\node.exe" "C:\\Users\\Y\\Desktop\\briup-pts\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" npm ERR! gyp ERR! cwd C:\Users\Y\Desktop\briup-pts\node_modules\node-sass npm ERR! gyp ERR! node -v v18.19.0 npm ERR! gyp ERR! node-gyp -v v3.8.0 npm ERR! gyp ERR! not ok npm ERR! Build failed with error code: 1 npm ERR! A complete log of this run can be found in: D:\aiqianduan\nodejs\node_cache\_logs\2025-11-13T09_38_50_502Z-debug-0.log
最新发布
11-14
npm info run deasync@0.1.30 install node_modules/deasync node ./build.js npm info run node-sass@4.14.1 install node_modules/node-sass node scripts/install.js npm info run yorkie@2.0.0 install node_modules/yorkie node bin/install.js npm info run deasync@0.1.30 install { code: 0, signal: null } npm info run yorkie@2.0.0 install { code: 0, signal: null } npm info run node-sass@4.14.1 install { code: 0, signal: null } npm info run ant-design-vue@1.7.8 postinstall node_modules/ant-design-vue node scripts/postinstall || echo "ignore" npm info run core-js@3.46.0 postinstall node_modules/core-js node -e "try{require('./postinstall')}catch(e){}" npm info run ejs@2.7.4 postinstall node_modules/ejs node ./postinstall.js npm info run node-sass@4.14.1 postinstall node_modules/node-sass node scripts/build.js npm info run core-js@2.6.12 postinstall node_modules/babel-runtime/node_modules/core-js node -e "try{require('./postinstall')}catch(e){}" npm info run ejs@2.7.4 postinstall { code: 0, signal: null } npm info run core-js@3.46.0 postinstall { code: 0, signal: null } npm info run ant-design-vue@1.7.8 postinstall { code: 0, signal: null } npm info run core-js@2.6.12 postinstall { code: 0, signal: null } npm info run node-sass@4.14.1 postinstall { code: 1, signal: null } npm warn cleanup Failed to remove some directories [ npm warn cleanup [ npm warn cleanup '\\\\?\\D:\\DS\\portal\\node_modules', npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'D:\DS\portal\node_modules\@vue'] { npm warn cleanup errno: -4048, npm warn cleanup code: 'EPERM', npm warn cleanup syscall: 'rmdir', npm warn cleanup path: 'D:\\DS\\portal\\node_modules\\@vue' npm warn cleanup } npm warn cleanup ], npm warn cleanup [ npm warn cleanup '\\\\?\\D:\\DS\\portal\\node_modules\\yhlcomponents', npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'D:\DS\portal\node_modules\yhlcomponents\node_modules'] { npm warn cleanup errno: -4048, npm warn cleanup code: 'EPERM', npm warn cleanup syscall: 'rmdir', npm warn cleanup path: 'D:\\DS\\portal\\node_modules\\yhlcomponents\\node_modules' npm warn cleanup } npm warn cleanup ] npm warn cleanup ] npm verbose stack Error: command failed npm verbose stack at promiseSpawn (D:\nodejs\node_global\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:22:22) npm verbose stack at spawnWithShell (D:\nodejs\node_global\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:124:10) npm verbose stack at promiseSpawn (D:\nodejs\node_global\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:12:12) npm verbose stack at runScriptPkg (D:\nodejs\node_global\node_modules\npm\node_modules\@npmcli\run-script\lib\run-script-pkg.js:79:13) npm verbose stack at runScript (D:\nodejs\node_global\node_modules\npm\node_modules\@npmcli\run-script\lib\run-script.js:9:12) npm verbose stack at D:\nodejs\node_global\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\rebuild.js:332:17 npm verbose stack at run (D:\nodejs\node_global\node_modules\npm\node_modules\promise-call-limit\dist\commonjs\index.js:67:22) npm verbose stack at D:\nodejs\node_global\node_modules\npm\node_modules\promise-call-limit\dist\commonjs\index.js:84:9 npm verbose stack at new Promise (<anonymous>) npm verbose stack at callLimit (D:\nodejs\node_global\node_modules\npm\node_modules\promise-call-limit\dist\commonjs\index.js:35:69) npm verbose pkgid node-sass@4.14.1 npm error code 1 npm error path D:\DS\portal\node_modules\node-sass npm error command failed npm error command C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js npm error Building: C:\Program Files\nodejs\node.exe D:\DS\portal\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= npm error gyp info it worked if it ends with ok npm error gyp verb cli [ npm error gyp verb cli 'C:\\Program Files\\nodejs\\node.exe', npm error gyp verb cli 'D:\\DS\\portal\\node_modules\\node-gyp\\bin\\node-gyp.js', npm error gyp verb cli 'rebuild', npm error gyp verb cli '--verbose', npm error gyp verb cli '--libsass_ext=', npm error gyp verb cli '--libsass_cflags=', npm error gyp verb cli '--libsass_ldflags=', npm error gyp verb cli '--libsass_library=' npm error gyp verb cli ] npm error gyp info using node-gyp@3.8.0 npm error gyp info using node@22.21.0 | win32 | x64 npm error gyp verb command rebuild [] npm error gyp verb command clean [] npm error gyp verb clean removing "build" directory npm error gyp verb command configure [] npm error gyp verb check python checking for Python executable "python2" in the PATH npm error gyp verb `which` failed Error: not found: python2 npm error gyp verb `which` failed at getNotFoundError (D:\DS\portal\node_modules\which\which.js:13:12) npm error gyp verb `which` failed at F (D:\DS\portal\node_modules\which\which.js:68:19) npm error gyp verb `which` failed at E (D:\DS\portal\node_modules\which\which.js:80:29) npm error gyp verb `which` failed at D:\DS\portal\node_modules\which\which.js:89:16 npm error gyp verb `which` failed at D:\DS\portal\node_modules\isexe\index.js:42:5 npm error gyp verb `which` failed at D:\DS\portal\node_modules\isexe\windows.js:36:5 npm error gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:197:21) npm error gyp verb `which` failed python2 Error: not found: python2 npm error gyp verb `which` failed at getNotFoundError (D:\DS\portal\node_modules\which\which.js:13:12) npm error gyp verb `which` failed at F (D:\DS\portal\node_modules\which\which.js:68:19) npm error gyp verb `which` failed at E (D:\DS\portal\node_modules\which\which.js:80:29) npm error gyp verb `which` failed at D:\DS\portal\node_modules\which\which.js:89:16 npm error gyp verb `which` failed at D:\DS\portal\node_modules\isexe\index.js:42:5 npm error gyp verb `which` failed at D:\DS\portal\node_modules\isexe\windows.js:36:5 npm error gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:197:21) { npm error gyp verb `which` failed code: 'ENOENT' npm error gyp verb `which` failed } npm error gyp verb check python checking for Python executable "python" in the PATH npm error gyp verb `which` succeeded python D:\Python\python.EXE npm error (node:12720) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead. npm error (Use `node --trace-deprecation ...` to show where the warning was created) npm error gyp ERR! configure error npm error gyp ERR! stack Error: Command failed: D:\Python\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3]; npm error gyp ERR! stack File "<string>", line 1 npm error gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3]; npm error gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ npm error gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? npm error gyp ERR! stack npm error gyp ERR! stack at genericNodeError (node:internal/errors:983:15) npm error gyp ERR! stack at wrappedFn (node:internal/errors:537:14) npm error gyp ERR! stack at ChildProcess.exithandler (node:child_process:417:12) npm error gyp ERR! stack at ChildProcess.emit (node:events:519:28) npm error gyp ERR! stack at maybeClose (node:internal/child_process:1101:16) npm error gyp ERR! stack at Socket.<anonymous> (node:internal/child_process:456:11) npm error gyp ERR! stack at Socket.emit (node:events:519:28) npm error gyp ERR! stack at Pipe.<anonymous> (node:net:346:12) npm error gyp ERR! System Windows_NT 10.0.19045 npm error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\DS\\portal\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" npm error gyp ERR! cwd D:\DS\portal\node_modules\node-sass npm error gyp ERR! node -v v22.21.0 npm error gyp ERR! node-gyp -v v3.8.0 npm error gyp ERR! not ok npm error Build failed with error code: 1 npm verbose cwd D:\DS\portal npm verbose os Windows_NT 10.0.19045 npm verbose node v22.21.0 npm verbose npm v11.6.2 npm verbose exit 1 npm verbose code 1 npm error A complete log of this run can be found in: D:\nodejs\node_cache\_logs\2025-10-31T06_28_53_508Z-debug-0.log PS D:\DS\portal>
11-01
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值