我是 npm install --legacy-peer-deps 成功了

解决方案

  1. 升级swiper:你可以尝试升级你的项目中的swiper库到5.2.0或更高版本,以满足vueawesomeswiper需求。你可以使用以下命令来进行升级

npm install swiper@latest

注意,这可能会带来一些新的问题,因为swiper的新版本可能包含一些不兼容的改动。
2. 使用 --force 或 --legacy-peer-deps 标志:你可以尝试使用以下命令来强制npm接受这个不正确依赖关系

npm install --force

或者

npm install --legacy-peer-deps

但是请注意,这可能会导致你的项目运行时出现错误,因为依赖关系没有实际解决。
3. 检查其他依赖:如果上述方法都不能解决问题,你可能需要检查你的项目中的其他依赖项,看看是否有其他的版本冲突。你可以使用以下命令来查看你的项目依赖树:

npm ls

这将显示你的项目及其所有依赖项的完整列表。在这个列表中,你可以查找是否有其他的版本冲突。

报错内容

npm ERR! code 1
npm ERR! path D:1taichu1-projectyunnanyunnanyzmnode_modulesnodesass
npm ERR! command failed
npm ERR! command C:WINDOWSsystem32cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: D:3nodenode.exe D:1taichu1-projectyunnanyunnan-yzmnode_modulesnode-gypbinnode-gyp.js rebuildverbose —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:\3node\node.exe’,
npm ERR! gyp verb cli   ‘D:\1taichu\1-project\yunnan\yunnan-yzm\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@12.13.1 | win32 | ia32
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removingbuilddirectory
npm ERR! gyp verb command configure []
npm ERR! gyp verb download using disturl https://npm.taobao.org/dist
npm ERR! gyp verb check python checking for Python executable “C:UsersAcerAnaconda3python37″ in the PATH
npm ERR! gyp verb `which` failed Error: not found: C:UsersAcerAnaconda3python37
npm ERR! gyp verb `which` failed     at getNotFoundError (D:1taichu1-projectyunnanyunnan-yzmnode_moduleswhichwhich.js:13:12)
npm ERR! gyp verb `which` failed     at F (D:1taichu1-projectyunnanyunnan-yzmnode_moduleswhichwhich.js:68:19)
npm ERR! gyp verb `which` failed     at E (D:1taichu1-projectyunnanyunnan-yzmnode_moduleswhichwhich.js:80:29)
npm ERR! gyp verb `which` failed     at D:1taichu1-projectyunnanyunnan-yzmnode_moduleswhichwhich.js:89:16
npm ERR! gyp verb `which` failed     at D:1taichu1-projectyunnanyunnan-yzmnode_modulesisexeindex.js:42:5
npm ERR! gyp verb `which` failed     at D:1taichu1-projectyunnanyunnan-yzmnode_modulesisexewindows.js:36:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21)
npm ERR! gyp verb `which` failed  C:UsersAcerAnaconda3python37 Error: not found: C:UsersAcerAnaconda3python37
npm ERR! gyp verb `which` failed     at getNotFoundError (D:1taichu1-projectyunnanyunnan-yzmnode_moduleswhichwhich.js:13:12)
npm ERR! gyp verb `which` failed     at F (D:1taichu1-projectyunnanyunnan-yzmnode_moduleswhichwhich.js:68:19)
npm ERR! gyp verb `which` failed     at E (D:1taichu1-projectyunnanyunnan-yzmnode_moduleswhichwhich.js:80:29)
npm ERR! gyp verb `which` failed     at D:1taichu1-projectyunnanyunnan-yzmnode_moduleswhichwhich.js:89:16
npm ERR! gyp verb `which` failed     at D:1taichu1-projectyunnanyunnan-yzmnode_modulesisexeindex.js:42:5
npm ERR! gyp verb `which` failed     at D:1taichu1-projectyunnanyunnan-yzmnode_modulesisexewindows.js:36:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21) {
npm ERR! gyp verb `which` failed   stack: ‘Error: not found: C:\Users\Acer\Anaconda3\python37n’ +
npm ERR! gyp verb `which` failed     ‘    at getNotFoundError (D:\1taichu\1-project\yunnan\yunnan-yzm\node_modules\which\which.js:13:12)n’ +
npm ERR! gyp verb `which` failed     ‘    at F (D:\1taichu\1-project\yunnan\yunnan-yzm\node_modules\which\which.js:68:19)n’ +
npm ERR! gyp verb `which` failed     ‘    at E (D:\1taichu\1-project\yunnan\yunnan-yzm\node_modules\which\which.js:80:29)n’ +
npm ERR! gyp verb `which` failed     ‘    at D:\1taichu\1-project\yunnan\yunnan-yzm\node_modules\which\which.js:89:16n’ +
npm ERR! gyp verb `which` failed     ‘    at D:\1taichu\1-project\yunnan\yunnan-yzm\node_modules\isexe\index.js:42:5n’ +
npm ERR! gyp verb `which` failed     ‘    at D:\1taichu\1-project\yunnan\yunnan-yzm\node_modules\isexe\windows.js:36:5n’ +
npm ERR! gyp verb `which` failed     ‘    at FSReqCallback.oncomplete (fs.js:158:21)’,
npm ERR! gyp verb `which` failed   code: ‘ENOENT’
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb could not find “C:UsersAcerAnaconda3python37″. checking python launcher
npm ERR! gyp verb could not find “C:UsersAcerAnaconda3python37″. guessing location
npm ERR! gyp verb ensuring that file exists: C:Python27python.exe
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can’t find Python executable “C:UsersAcerAnaconda3python37″, you can set the PYTHON env variable.
npm ERR! gyp ERR! stack     at PythonFinder.failNoPython (D:1taichu1-projectyunnanyunnan-yzmnode_modulesnode-gyplibconfigure.js:484:19)
npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (D:1taichu1-projectyunnanyunnan-yzmnode_modulesnode-gyplibconfigure.js:509:16)
npm ERR! gyp ERR! stack     at callback (D:1taichu1-projectyunnanyunnan-yzmnode_modulesgraceful-fspolyfills.js:306:20)
npm ERR! gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:158:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command “D:\3node\node.exe” “D:\1taichu\1-project\yunnan\yunnan-yzm\node_modules\node-gyp\bin\node-gyp.js” “rebuild” “–verbose” “–libsass_ext=” “–libsass_cflags=” “–libsass_ldflags=” “–libsass_library=”
npm ERR! gyp ERR! cwd D:1taichu1-projectyunnanyunnan-yzmnode_modulesnode-sass
npm ERR! gyp ERR! node -v v12.13.1
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!     C:UsersAcerAppDataLocalnpm-cache_logs2023-09-19T02_01_46_277Z-debug-0.log

原文地址:https://blog.csdn.net/m0_46615524/article/details/133016449

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任

如若转载,请注明出处:http://www.7code.cn/show_24450.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注