℡奋斗か 2024-03-19 20:34 采纳率: 68.8%
浏览 262
已结题

vue项目使用命令npm install --registry=https://registry.npmmirror.com --legacy-peer-deps 时报错,说node-sass出问题


npm ERR! code ETARGET
npm ERR! notarget No matching version found for @babel/plugin-transform-dynamic-import@^7.24.1.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\nodejs16\node_cache\_logs\2024-03-19T10_49_42_187Z-debug-0.log
PS D:\bs\admin>  npm install --registry=https://registry.npmmirror.com --legacy-peer-deps.
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 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 WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated figgy-pudding@3.5.2: This module is no longer supported.
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated eslint-loader@2.2.1: This loader has been deprecated. Please use eslint-webpack-plugin
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 WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated html-webpack-plugin@3.2.0: 3.x is no longer supported
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
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 WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated webpack-chain@6.5.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm WARN deprecated axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated svgo@1.2.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
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 vue@2.7.16: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.    
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, feature 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! code 1
npm ERR! path D:\bs\admin\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c C:\Users\LENOVO\AppData\Local\Temp\postinstall-3d806f5f.cmd
npm ERR! Building: D:\nodejs16\node.exe D:\bs\admin\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! �ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ������ӡ�/m�����ء�
npm ERR! ��������ʱ��Ϊ 2024/3/19 19:09:28��
npm ERR! �ڵ� 1 �ϵ���Ŀ��D:\bs\admin\node_modules\node-sass\build\binding.sln��(Ĭ��Ŀ��)��
npm ERR! ValidateSolutionConfiguration:
npm ERR!   �������ɽ���������á�Release|x64����
npm ERR! MSBUILD : error MSB3428: δ�ܼ��� Visual C++ �����VCBuild.exe����Ҫ��������⣬1) ��װ .NET Framework 2.0 SDK��2) ��װ Microsoft Visual Studio
 2005���� 3) ������������װ��������λ�ã��뽫��λ�����ӵ�ϵͳ·���С� [D:\bs\admin\node_modules\node-sass\build\binding.sln]
npm ERR! �����������Ŀ��D:\bs\admin\node_modules\node-sass\build\binding.sln��(Ĭ��Ŀ��)�IJ��� - ʧ�ܡ�
npm ERR!
npm ERR! ����ʧ�ܡ�
npm ERR!
npm ERR! ��D:\bs\admin\node_modules\node-sass\build\binding.sln��(Ĭ��Ŀ��) (1) ->
npm ERR! (_src_\libsass Ŀ��) ->
npm ERR!   MSBUILD : error MSB3428: δ�ܼ��� Visual C++ �����VCBuild.exe����Ҫ��������⣬1) ��װ .NET Framework 2.0 SDK��2) ��װ Microsoft Visual Stud
io 2005���� 3) ������������װ��������λ�ã��뽫��λ�����ӵ�ϵͳ·���С� [D:\bs\admin\node_modules\node-sass\build\binding.sln]
npm ERR!
npm ERR!     0 ������
npm ERR!     1 ������
npm ERR!
npm ERR! ����ʱ�� 00:00:00.08
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   'D:\\nodejs16\\node.exe',
npm ERR! gyp verb cli   'D:\\bs\\admin\\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.17.1 | 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 (D:\bs\admin\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed     at F (D:\bs\admin\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed     at E (D:\bs\admin\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed     at D:\bs\admin\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed     at D:\bs\admin\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed     at D:\bs\admin\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:206:21)
npm ERR! gyp verb `which` failed  python2 Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (D:\bs\admin\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed     at F (D:\bs\admin\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed     at E (D:\bs\admin\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed     at D:\bs\admin\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed     at D:\bs\admin\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed     at D:\bs\admin\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:206: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 D:\python27\python.EXE
npm ERR! gyp verb check python version `D:\python27\python.EXE -c "import sys; print "2.7.1
npm ERR! gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 16.17.1
npm ERR! gyp verb command install [ '16.17.1' ]
npm ERR! gyp verb install input version string "16.17.1"
npm ERR! gyp verb install installing version: 16.17.1
npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
npm ERR! gyp verb install version is already installed, need to check "installVersion"
npm ERR! gyp verb got "installVersion" 9
npm ERR! gyp verb needs "installVersion" 9
npm ERR! gyp verb install version is good
npm ERR! gyp verb get node dir target node version installed: 16.17.1
npm ERR! gyp verb build dir attempting to create "build" dir: D:\bs\admin\node_modules\node-sass\build
npm ERR! gyp verb build dir "build" dir needed to be created? D:\bs\admin\node_modules\node-sass\build
npm ERR! gyp verb find vs2017 Found installation at: E:\Program Files\Microsoft Visual Studio\2022\Community
npm ERR! gyp verb find vs2017   - Found Microsoft.VisualStudio.Component.VC.Tools.x86.x64
npm ERR! gyp verb find vs2017   - Missing Visual Studio C++ core features (Microsoft.VisualStudio.VC.MSBuild.Base)
npm ERR! gyp verb find vs2017   - Missing a Windows SDK (Microsoft.VisualStudio.Component.Windows10SDK.* or Microsoft.VisualStudio.Component.Windows81SDK)
npm ERR! gyp verb find vs2017   - Some required components are missing, not using this installation
npm ERR! gyp verb Not using VS2017: No usable installation of VS2017 found
npm ERR! gyp verb build/config.gypi creating config file
npm ERR! gyp verb build/config.gypi writing out config file: D:\bs\admin\node_modules\node-sass\build\config.gypi
npm ERR! (node:3312) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp verb config.gypi checking for gypi file: D:\bs\admin\node_modules\node-sass\config.gypi
npm ERR! gyp verb common.gypi checking for gypi file: D:\bs\admin\node_modules\node-sass\common.gypi
npm ERR! gyp verb gyp gyp format was not specified; forcing "msvs"
npm ERR! gyp info spawn D:\python27\python.EXE
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   'D:\\bs\\admin\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'msvs',
npm ERR! gyp info spawn args   '-G',
npm ERR! gyp info spawn args   'msvs_version=auto',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'D:\\bs\\admin\\node_modules\\node-sass\\build\\config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'D:\\bs\\admin\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Users\\LENOVO\\.node-gyp\\16.17.1\\include\\node\\common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=C:\\Users\\LENOVO\\.node-gyp\\16.17.1',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=D:\\bs\\admin\\node_modules\\node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=C:\\Users\\LENOVO\\.node-gyp\\16.17.1\\<(target_arch)\\node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=D:\\bs\\admin\\node_modules\\node-sass',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'D:\\bs\\admin\\node_modules\\node-sass\\build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
npm ERR! Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
npm ERR! Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
npm ERR! Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
npm ERR! gyp verb command build []
npm ERR! gyp verb build type Release
npm ERR! gyp verb architecture x64
npm ERR! gyp verb node dev dir C:\Users\LENOVO\.node-gyp\16.17.1
npm ERR! gyp verb found first Solution file build/binding.sln
npm ERR! gyp verb could not find "msbuild.exe" in PATH - finding location in registry
npm ERR! gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   'build/binding.sln',
npm ERR! gyp info spawn args   '/nologo',
npm ERR! gyp info spawn args   '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onExit (D:\bs\admin\node_modules\node-gyp\lib\build.js:262:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "D:\\nodejs16\\node.exe" "D:\\bs\\admin\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd D:\bs\admin\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.17.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!     D:\nodejs16\node_cache\_logs\2024-03-19T11_08_49_497Z-debug-0.log
PS D:\bs\admin>
  • 写回答

4条回答 默认 最新

  • 雾里桃花 2024-03-20 16:08
    关注

    node版本降到12.15.0试试,可以下载一个nvm(node版本管理器)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

问题事件

  • 系统已结题 4月22日
  • 已采纳回答 4月14日
  • 创建了问题 3月19日

悬赏问题

  • ¥15 Windows Script Host 无法找到脚本文件"C:\ProgramData\Player800\Cotrl.vbs”
  • ¥15 matlab自定义损失函数
  • ¥15 35114 SVAC视频验签的问题
  • ¥15 impedancepy
  • ¥15 求往届大挑得奖作品(ppt…)
  • ¥15 如何在vue.config.js中读取到public文件夹下window.APP_CONFIG.API_BASE_URL的值
  • ¥50 浦育平台scratch图形化编程
  • ¥20 求这个的原理图 只要原理图
  • ¥15 vue2项目中,如何配置环境,可以在打完包之后修改请求的服务器地址
  • ¥20 微信的店铺小程序如何修改背景图