使用npm I vue-router和npm I vue-router@3指令都不行,报了好多错误 还看不明白是什么错误 请求指点!
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 '-I',
npm ERR! gyp info spawn args 'E:\Vscode-Workspace\Vue2Evaluation\vue2evaluation\node_modules\node-sass\build\config.gypi',npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'E:\Vscode-Workspace\Vue2Evaluation\vue2evaluation\node_modules\node-gyp\addon.gypi',npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\hp\AppData\Local\node-gyp\Cache\18.15.0\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\hp\AppData\Local\node-gyp\Cache\18.15.0',npm ERR! gyp info spawn args '-Dnode_gyp_dir=E:\Vscode-Workspace\Vue2Evaluation\vue2evaluation\node_modules\node-gyp',npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\hp\\AppData\\Local\\node-gyp\\Cache\\18.15.0\\<(target_arch)\\node.lib',npm ERR! gyp info spawn args '-Dmodule_root_dir=E:\Vscode-Workspace\Vue2Evaluation\vue2evaluation\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 'E:\Vscode-Workspace\Vue2Evaluation\vue2evaluation\node_modules\node-sass\build',npm ERR! gyp info spawn args '-Goutput_dir=.'npm ERR! gyp info spawn args ]npm ERR! gyp verb command build []npm ERR! gyp verb build type Releasenpm ERR! gyp verb architecture x64npm ERR! gyp verb node dev dir C:\Users\hp\AppData\Local\node-gyp\Cache\18.15.0npm ERR! gyp verb found first Solution file build/binding.slnnpm ERR! gyp verb using MSBuild: D:\Visual Studio IDE\MSBuild\Current\Bin\MSBuild.exenpm ERR! gyp info spawn D:\Visual Studio IDE\MSBuild\Current\Bin\MSBuild.exenpm 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 errornpm ERR! gyp ERR! stack Error: D:\Visual Studio IDE\MSBuild\Current\Bin\MSBuild.exe
failed with exit code: 1npm ERR! gyp ERR! stack at ChildProcess.onExit (E:\Vscode-Workspace\Vue2Evaluation\vue2evaluation\node_modules\node-gyp\lib\build.js:194:23)npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)npm ERR! gyp ERR! System Windows_NT 10.0.19045npm ERR! gyp ERR! command "E:\nodejs\node.exe" "E:\Vscode-Workspace\Vue2Evaluation\vue2evaluation\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="npm ERR! gyp ERR! cwd E:\Vscode-Workspace\Vue2Evaluation\vue2evaluation\node_modules\node-sassnpm ERR! gyp ERR! node -v v18.15.0npm ERR! gyp ERR! node-gyp -v v8.4.1npm ERR! gyp ERR! not oknpm ERR! Build failed with error code: 1npm ERR! A complete log of this run can be found in: C:\Users\hp\AppData\Local\npm-cache_logs\2023-05-23T16_01_21_828Z-debug-0.log
vue-router安装一直出错如何解决?
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
3条回答 默认 最新
关注 - 这个问题的回答你可以参考下: https://ask.csdn.net/questions/7789981
- 你也可以参考下这篇文章:vue学习笔记(一)(vue webpack+vue-router+nodeJs npm)
- 除此之外, 这篇博客: 如何安装vue-router?中的 NPM 部分也许能够解决你的问题, 你可以仔细阅读以下内容或跳转源博客中阅读:
npm install vue-router
如果在一个模块化工程中使用它,必须要通过 Vue.use() 明确地安装路由功能import Vue from 'vue' import VueRouter from 'vue-router' Vue.use(VueRouter)
解决 无用评论 打赏 举报
悬赏问题
- ¥15 依据报错在原代吗格式的基础上解决问题
- ¥15 在虚拟机中安装flash code
- ¥15 单片机stm32f10x编写光敏电阻调节3.3伏大功率灯亮度(光强越大灯越暗,白天正常光强灯不亮,使用ADC,PWM等模块)望各位找一下错误或者提供一个可实现功能的代码
- ¥20 verilog状态机方法流水灯
- ¥15 pandas代码实现不了意图
- ¥15 GD32H7 从存储器到外设SPI传输数据无法重复启用DMA
- ¥25 LT码在高斯信道下的误码率仿真
- ¥45 渲染完成之后将物体的材质贴图改变,自动化进行这个操作
- ¥15 yolov5目标检测并显示目标出现的时间或视频帧
- ¥15 电视版的优酷可以设置电影连续播放吗?