解决npm警告:“npm WARN cleanup Failed to remove some directories”的方法

解决npm警告:npm WARN cleanup Failed to remove some directories

前言

在npm安装依赖包时,碰到了一连串的问题,解决了一下午,可以说是找遍了网上的方法,依旧难以解决。最后发现,直接删除目录下的文件夹就可以直接解决掉这个问题。“npm WARN cleanup Failed to remove some directories”。这个警告表示,在执行npm命令时,有一些目录无法被删除。

接下来,我将具体展示如何解决这个问题,可能不适用于所有情况,但最终成功安装上了我需要的依赖包。

实例背景

我面临的问题是,在VUE项目中下载安装@element-plus/icons-vue此依赖包,出现了npm WARN cleanup Failed to remove some directories等下图一系列的报错。

执行的命令为:

npm list element-plus @element-plus/icons-vue

具体解决的步骤如下:

1.阅读警告信息:找到以下行。
npm warn cleanup     'D:\\project\\OkPaper\\frontend\\node_modules\\element-plus',
npm warn cleanup     [Error: ENOTEMPTY: directory not empty, rmdir 'D:\project\OkPaper\frontend\node_modules\element-plus\dist']
2.确定要删除的目录。

报错信息显示:目录未空npm 在删除旧的 element-plus 目录时遇到问题,提示该目录不为空。这可能导致新版本无法安装。所以此时我们应该手动删除这个包。

3.手动删除目录

找到文件所在目录,我的项目文件路径是:D:\project\OkPaper\frontend\node_modules。

找到应该删除的文件:

我们应该删除这个文件夹,但这里会出现一些小问题,必须要管理员权限才可以删除

解决方案:Win+R,进入cmd模式,进入该文件夹中,使用以下命令行:

rd /s 需要删除的文件夹名称

按回车健,即可完成删除。

4. 清除npm缓存
npm cache clean --force
5. 重新执行你需要的npm命令

在我的项目中,我需要重新安装该依赖包,即执行:

npm install element-plus @element-plus/icons-vue

执行之后就可以得到成功安装的结果

再次执行此命令行,如果可以得到版本号,即安装成功

至此,问题成功解决。

说明

应该说这是一个挺简单的小问题,但属实是困扰了我一下午,一直解决一直报错,最后仔细阅读了报错信息才发现,原来我项目中已经安装了这个依赖包,但没有安装成功,需要手动删除文件夹才可以重新安装。还是不够细心导致浪费了这么久的时间,希望能对其他遇到类似问题的读者带来一些帮助。

C:\Users\Administrator>npm install opencv4nodejs npm WARN cleanup Failed to remove some directories [ npm WARN cleanup [ npm WARN cleanup 'C:\\Users\\Administrator\\node_modules\\opencv-build', npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Administrator\node_modules\opencv-build'] { npm WARN cleanup errno: -4082, npm WARN cleanup code: 'EBUSY', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: 'C:\\Users\\Administrator\\node_modules\\opencv-build' npm WARN cleanup } npm WARN cleanup ], npm WARN cleanup [ npm WARN cleanup 'C:\\Users\\Administrator\\node_modules', npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Administrator\node_modules\opencv-build'] { npm WARN cleanup errno: -4082, npm WARN cleanup code: 'EBUSY', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: 'C:\\Users\\Administrator\\node_modules\\opencv-build' npm WARN cleanup } npm WARN cleanup ], npm WARN cleanup [ npm WARN cleanup 'C:\\Users\\Administrator\\node_modules\\readable-stream', npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\Administrator\node_modules\readable-stream'] { npm WARN cleanup errno: -4048, npm WARN cleanup code: 'EPERM', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: 'C:\\Users\\Administrator\\node_modules\\readable-stream' npm WARN cleanup } npm WARN cleanup ] npm WARN cleanup ] npm ERR! code 1 npm ERR! path C:\Users\Administrator\node_modules\opencv4nodejs npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node ./install/install.js npm ERR! info install using lib dir: C:/Users/Administrator/node_modules/opencv-build/opencv/build/lib/Release npm ERR! C:\Users\Administrator\node_modules\opencv4nodejs\install\install.js:37 npm ERR! throw new Error('library dir does not exist: ' + libDir) npm ERR! ^ npm ERR! npm ERR! Error: library dir does not exist: C:/Users/Administrator/node_modules/opencv-build/opencv/build/lib/Release npm ERR! at Object.<anonymous> (C:\Users\Administrator\node_modules\opencv4nodejs\install\install.js:37:9) npm ERR! at Module._compile (node:internal/modules/cjs/loader:1254:14) npm ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) npm ERR! at Module.load (node:internal/modules/cjs/loader:1117:32) npm ERR! at Module._load (node:internal/modules/cjs/loader:958:12) npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) npm ERR! at node:internal/main/run_main_module:23:47 npm ERR! npm ERR! Node.js v18.16.0 npm ERR! A complete log of this run can be found in: npm ERR! H:\nodejs\node_cache\_logs\2023-05-15T14_05_10_717Z-debug-0.log
05-16
npm ERR! code 1 npm ERR! git dep preparation failed npm ERR! command D:\Program Files\nodejs\node.exe D:\node\nodejs\node_global\node_modules\npm\bin\npm-cli.js install --force --cache=D:\Program Files\nodejs\node_cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run npm ERR! npm WARN using --force Recommended protections disabled. npm ERR! npm WARN deprecated osenv@0.1.5: This package is no longer supported. npm ERR! npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm ERR! npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs npm ERR! npm WARN deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead. npm ERR! npm WARN deprecated lodash.isequal@4.5.0: This package is deprecated. Use require('node:util').isDeepStrictEqual instead. npm ERR! npm WARN deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead npm ERR! npm WARN deprecated move-concurrently@1.0.1: This package is no longer supported. npm ERR! npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility npm ERR! npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm ERR! npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm ERR! npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm ERR! npm WARN deprecated figgy-pudding@3.5.2: This module is no longer supported. npm ERR! npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm ERR! npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm ERR! npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm ERR! npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm ERR! npm WARN deprecated npmlog@4.1.2: This package is no longer supported. npm ERR! npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained npm ERR! npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained npm ERR! npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm ERR! npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm ERR! npm WARN deprecated consolidate@0.15.1: Please upgrade to consolidate v1.0.0+ as it has been modernized with several long-awaited fixes implemented. Maintenance is supported by Forward Email at https://forwardemail.net ; follow/watch https://github.com/ladjs/consolidate for updates and release changelog npm ERR! npm WARN deprecated copy-concurrently@1.0.5: This package is no longer supported. npm ERR! npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm ERR! npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm ERR! npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm ERR! npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm ERR! npm WARN deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. npm ERR! npm WARN deprecated npm ERR! npm WARN deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) npm ERR! npm WARN deprecated glob@7.1.7: Glob versions prior to v9 are no longer supported npm ERR! npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead npm ERR! npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm ERR! npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm ERR! npm WARN deprecated are-we-there-yet@1.1.7: This package is no longer supported. npm ERR! npm WARN deprecated html-webpack-plugin@3.2.0: 3.x is no longer supported npm ERR! npm WARN deprecated fs-write-stream-atomic@1.0.10: This package is no longer supported. npm ERR! npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address' npm ERR! npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates. npm ERR! npm WARN deprecated @babel/polyfill@7.12.1: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information. npm ERR! npm WARN deprecated gauge@2.7.4: This package is no longer supported. npm ERR! npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm ERR! npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm ERR! npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm ERR! npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm ERR! npm WARN deprecated webpack-chain@6.5.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm ERR! npm WARN deprecated fstream@1.0.12: This package is no longer supported. npm ERR! npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained npm ERR! npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi' npm ERR! npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x. npm ERR! 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 ERR! npm WARN deprecated iltorb@2.4.5: The zlib module provides APIs for brotli compression/decompression starting with Node.js v10.16.0, please use it over iltorb npm ERR! npm WARN deprecated vue@2.6.14: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details. npm ERR! npm WARN deprecated node-sass@4.14.1: Node Sass is no longer supported. Please use `sass` or `sass-embedded` instead. npm ERR! npm WARN deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options. npm ERR! npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, fea ture detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. npm ERR! npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, fea ture detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. npm ERR! npm WARN cleanup Failed to remove some directories [ npm ERR! npm WARN cleanup [ npm ERR! npm WARN cleanup 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\mozjpeg', npm ERR! npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\mozjpeg'] { npm ERR! npm WARN cleanup errno: -4082, npm ERR! npm WARN cleanup code: 'EBUSY', npm ERR! npm WARN cleanup syscall: 'rmdir', npm ERR! npm WARN cleanup path: 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\mozjpeg' npm ERR! npm WARN cleanup } npm ERR! npm WARN cleanup ], npm ERR! npm WARN cleanup [ npm ERR! npm WARN cleanup 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\optipng-bin', npm ERR! npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\optipng-bin'] { npm ERR! npm WARN cleanup errno: -4082, npm ERR! npm WARN cleanup code: 'EBUSY', npm ERR! npm WARN cleanup syscall: 'rmdir', npm ERR! npm WARN cleanup path: 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\optipng-bin' npm ERR! npm WARN cleanup } npm ERR! npm WARN cleanup ], npm ERR! npm WARN cleanup [ npm ERR! npm WARN cleanup 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\cwebp-bin', npm ERR! npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\cwebp-bin'] { npm ERR! npm WARN cleanup errno: -4082, npm ERR! npm WARN cleanup code: 'EBUSY', npm ERR! npm WARN cleanup syscall: 'rmdir', npm ERR! npm WARN cleanup path: 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\cwebp-bin' npm ERR! npm WARN cleanup } npm ERR! npm WARN cleanup ], npm ERR! npm WARN cleanup [ npm ERR! npm WARN cleanup 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\gifsicle', npm ERR! npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\gifsicle'] { npm ERR! npm WARN cleanup errno: -4082, npm ERR! npm WARN cleanup code: 'EBUSY', npm ERR! npm WARN cleanup syscall: 'rmdir', npm ERR! npm WARN cleanup path: 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\gifsicle' npm ERR! npm WARN cleanup } npm ERR! npm WARN cleanup ], npm ERR! npm WARN cleanup [ npm ERR! npm WARN cleanup 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\pngquant-bin', npm ERR! npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\pngquant-bin'] { npm ERR! npm WARN cleanup errno: -4082, npm ERR! npm WARN cleanup code: 'EBUSY', npm ERR! npm WARN cleanup syscall: 'rmdir', npm ERR! npm WARN cleanup path: 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\pngquant-bin' npm ERR! npm WARN cleanup } npm ERR! npm WARN cleanup ], npm ERR! npm WARN cleanup [ npm ERR! npm WARN cleanup 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules', npm ERR! npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\cwebp-bin'] { npm ERR! npm WARN cleanup errno: -4082, npm ERR! npm WARN cleanup code: 'EBUSY', npm ERR! npm WARN cleanup syscall: 'rmdir', npm ERR! npm WARN cleanup path: 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\cwebp-bin' npm ERR! npm WARN cleanup } npm ERR! npm WARN cleanup ], npm ERR! npm WARN cleanup [ npm ERR! npm WARN cleanup 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\@babel\\polyfill', npm ERR! npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\@babel\polyfill'] { npm ERR! npm WARN cleanup errno: -4048, npm ERR! npm WARN cleanup code: 'EPERM', npm ERR! npm WARN cleanup syscall: 'rmdir', npm ERR! npm WARN cleanup path: 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\@babel\\polyfill' npm ERR! npm WARN cleanup } npm ERR! npm WARN cleanup ] npm ERR! npm WARN cleanup ] npm ERR! npm ERR! code 1 npm ERR! npm ERR! path D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-sass npm ERR! npm ERR! command failed npm ERR! npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js npm ERR! npm ERR! Building: D:\Program Files\nodejs\node.exe D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= npm ERR! npm ERR! �ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ������ӡ�/m�����ء� npm ERR! npm ERR! ��������ʱ��Ϊ 2025/5/27 15:48:02�� npm ERR! npm ERR! �ڵ� 1 �ϵ���Ŀ��D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-sass\build\binding.sln��(Ĭ��Ŀ��)�� npm ERR! npm ERR! ValidateSolutionConfiguration: npm ERR! npm ERR! �������ɽ���������á�Release|x64���� npm ERR! npm ERR! MSBUILD : error MSB3428: δ�ܼ��� Visual C++ �����VCBuild.exe����Ҫ��������⣬1) ��װ .NET Framework 2.0 SDK��2) ��װ Microsoft Visual Studio 2005���� 3) ������������װ��������λ�ã��뽫��λ�����ӵ�ϵͳ·���С� [D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-sass\build\binding.sln] npm ERR! npm ERR! �����������Ŀ��D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-sass\build\binding.sln��(Ĭ��Ŀ��)�IJ��� - ʧ�ܡ� npm ERR! npm ERR! npm ERR! npm ERR! ����ʧ�ܡ� npm ERR! npm ERR! npm ERR! npm ERR! ��D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-sass\build\binding.sln��(Ĭ��Ŀ��) (1) -> npm ERR! npm ERR! (_src_\libsass Ŀ��) -> npm ERR! npm ERR! MSBUILD : error MSB3428: δ�ܼ��� Visual C++ �����VCBuild.exe����Ҫ��������⣬1) ��װ .NET Framework 2.0 SDK��2) ��װ Microsoft Visual Studio 2005���� 3) ������������װ��������λ�ã��뽫��λ�����ӵ�ϵͳ·���С� [D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-sass\build\binding.sln] npm ERR! npm ERR! npm ERR! npm ERR! 0 ������ npm ERR! npm ERR! 1 ������ npm ERR! npm ERR! npm ERR! npm ERR! ����ʱ�� 00:00:00.40 npm ERR! npm ERR! gyp info it worked if it ends with ok npm ERR! npm ERR! gyp verb cli [ npm ERR! npm ERR! gyp verb cli 'D:\\Program Files\\nodejs\\node.exe', npm ERR! npm ERR! gyp verb cli 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\node-gyp\\bin\\node-gyp.js', npm ERR! npm ERR! gyp verb cli 'rebuild', npm ERR! npm ERR! gyp verb cli '--verbose', npm ERR! npm ERR! gyp verb cli '--libsass_ext=', npm ERR! npm ERR! gyp verb cli '--libsass_cflags=', npm ERR! npm ERR! gyp verb cli '--libsass_ldflags=', npm ERR! npm ERR! gyp verb cli '--libsass_library=' npm ERR! npm ERR! gyp verb cli ] npm ERR! npm ERR! gyp info using node-gyp@3.8.0 npm ERR! npm ERR! gyp info using node@14.20.0 | win32 | x64 npm ERR! npm ERR! gyp verb command rebuild [] npm ERR! npm ERR! gyp verb command clean [] npm ERR! npm ERR! gyp verb clean removing "build" directory npm ERR! npm ERR! gyp verb command configure [] npm ERR! npm ERR! gyp verb check python checking for Python executable "python2" in the PATH npm ERR! npm ERR! gyp verb `which` failed Error: not found: python2 npm ERR! npm ERR! gyp verb `which` failed at getNotFoundError (D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-gyp\node_modules\which\which.js:13:12) npm ERR! npm ERR! gyp verb `which` failed at F (D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-gyp\node_modules\which\which.js:68:19) npm ERR! npm ERR! gyp verb `which` failed at E (D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-gyp\node_modules\which\which.js:80:29) npm ERR! npm ERR! gyp verb `which` failed at D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-gyp\node_modules\which\which.js:89:16 npm ERR! npm ERR! gyp verb `which` failed at D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\isexe\index.js:42:5 npm ERR! npm ERR! gyp verb `which` failed at D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\isexe\windows.js:36:5 npm ERR! npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:192:21) npm ERR! npm ERR! gyp verb `which` failed python2 Error: not found: python2 npm ERR! npm ERR! gyp verb `which` failed at getNotFoundError (D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-gyp\node_modules\which\which.js:13:12) npm ERR! npm ERR! gyp verb `which` failed at F (D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-gyp\node_modules\which\which.js:68:19) npm ERR! npm ERR! gyp verb `which` failed at E (D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-gyp\node_modules\which\which.js:80:29) npm ERR! npm ERR! gyp verb `which` failed at D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-gyp\node_modules\which\which.js:89:16 npm ERR! npm ERR! gyp verb `which` failed at D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\isexe\index.js:42:5 npm ERR! npm ERR! gyp verb `which` failed at D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\isexe\windows.js:36:5 npm ERR! npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:192:21) { npm ERR! npm ERR! gyp verb `which` failed code: 'ENOENT' npm ERR! npm ERR! gyp verb `which` failed } npm ERR! npm ERR! gyp verb check python checking for Python executable "python" in the PATH npm ERR! npm ERR! gyp verb `which` succeeded python D:\Python27\python.EXE npm ERR! npm ERR! gyp verb check python version `D:\Python27\python.EXE -c "import sys; print "2.7.0 npm ERR! npm ERR! gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j npm ERR! npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 14.20.0 npm ERR! npm ERR! gyp verb command install [ '14.20.0' ] npm ERR! npm ERR! gyp verb install input version string "14.20.0" npm ERR! npm ERR! gyp verb install installing version: 14.20.0 npm ERR! npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed npm ERR! npm ERR! gyp verb install version is already installed, need to check "installVersion" npm ERR! npm ERR! gyp verb got "installVersion" 9 npm ERR! npm ERR! gyp verb needs "installVersion" 9 npm ERR! npm ERR! gyp verb install version is good npm ERR! npm ERR! gyp verb get node dir target node version installed: 14.20.0 npm ERR! npm ERR! gyp verb build dir attempting to create "build" dir: D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-sass\build npm ERR! npm ERR! gyp verb build dir "build" dir needed to be created? D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-sass\build npm ERR! npm ERR! gyp verb Not using VS2017: Could not use PowerShell to find VS2017 npm ERR! npm ERR! gyp verb build/config.gypi creating config file npm ERR! npm ERR! gyp verb build/config.gypi writing out config file: D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-sass\build\config.gypi npm ERR! npm ERR! gyp verb config.gypi checking for gypi file: D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-sass\config.gypi npm ERR! npm ERR! gyp verb common.gypi checking for gypi file: D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-sass\common.gypi npm ERR! npm ERR! gyp verb gyp gyp format was not specified; forcing "msvs" npm ERR! npm ERR! gyp info spawn D:\Python27\python.EXE npm ERR! npm ERR! gyp info spawn args [ npm ERR! npm ERR! gyp info spawn args 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\node-gyp\\gyp\\gyp_main.py', npm ERR! npm ERR! gyp info spawn args 'binding.gyp', npm ERR! npm ERR! gyp info spawn args '-f', npm ERR! npm ERR! gyp info spawn args 'msvs', npm ERR! npm ERR! gyp info spawn args '-G', npm ERR! npm ERR! gyp info spawn args 'msvs_version=auto', npm ERR! npm ERR! gyp info spawn args '-I', npm ERR! npm ERR! gyp info spawn args 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\node-sass\\build\\config.gypi', npm ERR! npm ERR! gyp info spawn args '-I', npm ERR! npm ERR! gyp info spawn args 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\node-gyp\\addon.gypi', npm ERR! npm ERR! gyp info spawn args '-I', npm ERR! npm ERR! gyp info spawn args 'C:\\Users\\23969\\.node-gyp\\14.20.0\\include\\node\\common.gypi', npm ERR! npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! npm ERR! gyp info spawn args '-Dnode_root_dir=C:\\Users\\23969\\.node-gyp\\14.20.0', npm ERR! npm ERR! gyp info spawn args '-Dnode_gyp_dir=D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\node-gyp', npm ERR! npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\23969\\.node-gyp\\14.20.0\\<(target_arch)\\node.lib', npm ERR! npm ERR! gyp info spawn args '-Dmodule_root_dir=D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\node-sass', npm ERR! npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! npm ERR! gyp info spawn args '--depth=.', npm ERR! npm ERR! gyp info spawn args '--no-parallel', npm ERR! npm ERR! gyp info spawn args '--generator-output', npm ERR! npm ERR! gyp info spawn args 'D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\node-sass\\build', npm ERR! npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! npm ERR! gyp info spawn args ] npm ERR! npm ERR! Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation npm ERR! npm ERR! Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation npm ERR! npm ERR! Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation npm ERR! npm ERR! Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation npm ERR! npm ERR! gyp verb command build [] npm ERR! npm ERR! gyp verb build type Release npm ERR! npm ERR! gyp verb architecture x64 npm ERR! npm ERR! gyp verb node dev dir C:\Users\23969\.node-gyp\14.20.0 npm ERR! npm ERR! gyp verb found first Solution file build/binding.sln npm ERR! npm ERR! gyp verb could not find "msbuild.exe" in PATH - finding location in registry npm ERR! npm ERR! gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe npm ERR! npm ERR! gyp info spawn args [ npm ERR! npm ERR! gyp info spawn args 'build/binding.sln', npm ERR! npm ERR! gyp info spawn args '/nologo', npm ERR! npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64' npm ERR! npm ERR! gyp info spawn args ] npm ERR! npm ERR! gyp ERR! build error npm ERR! npm ERR! gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1 npm ERR! npm ERR! gyp ERR! stack at ChildProcess.onExit (D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-gyp\lib\build.js:262:23) npm ERR! npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:400:28) npm ERR! npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12) npm ERR! npm ERR! gyp ERR! System Windows_NT 10.0.26100 npm ERR! npm ERR! gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\git-cloneuwf27x\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" npm ERR! npm ERR! gyp ERR! cwd D:\Program Files\nodejs\node_cache\_cacache\tmp\git-cloneuwf27x\node_modules\node-sass npm ERR! npm ERR! gyp ERR! node -v v14.20.0 npm ERR! npm ERR! gyp ERR! node-gyp -v v3.8.0 npm ERR! npm ERR! gyp ERR! not ok npm ERR! npm ERR! Build failed with error code: 1
最新发布
05-28
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

爱吃小白兔的猫

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值