node.js - 无法安装 vue-cli,找不到匹配的版本
问题描述
我无法安装 vue-cli,它要求我安装特定的 express-serve-static 包,但是我也无法安装该包。我该如何解决这个问题?
当我尝试安装 vue-cli 时,
sudo npm install -g @vue/cli
给我错误:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @types/express-serve-static-core@4.17.13.
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! notarget
npm ERR! notarget It was specified as a dependency of 'apollo-server-express'
- 然后我只是尝试安装 express-serve-static
$ npm install -g @types/express-serve-static-core
+ @types/express-serve-static-core@4.17.12
updated 1 package in 4.536s
- 如您所见,npm 没有安装 4.17.13,然后我只是更改命令:
$ npm install -g @types/express-serve-static-core@4.17.13
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @types/express-serve-static-core@4.17.13.
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 版本:
$ node -v
v14.15.1
$ which node
.../Desktop/node_and_npm/node-v14.15.1-darwin-x64/bin/node
$ npm -v
6.14.8
$ which npm
.../Desktop/node_and_npm/node-v14.15.1-darwin-x64/bin/npm
解决方案
推荐阅读
- csv - 即使在 12 小时后也没有完成加载 csv 的查询
- python - Alexa 中位置服务的端点是什么?
- sql - SQL Server - 带有变量和 SUM() 方法的 SELECT 语句
- amazon-web-services - Dynamodb 成本与 Aurora 成本比较
- windows - Windows和嵌入式系统(STM32)之间的串行通信数据问题(C/C++)
- postgresql - 与原始数据库相比,还原转储的物化视图上的搜索查询速度较慢
- node.js - 在编排中捕获错误后未执行活动
- scheme - 建立一个具有相同 n 项的列表
- ios - 切换方案后 Xcode 配置不会改变
- firebase - 如何在离线模式下更新 Firebase 实时数据库“推送”上的 UI