如何安装 ember-cli 4.12.1

huangapple go评论56阅读模式
英文:

How to install ember-cli 4.12.1

问题

当我使用以下命令通过npm安装ember-cli 4.12.1时:

# npm install -g ember-cli@4.12.1

安装成功,但我看到ember-cli的版本是3.27.0:

# ember --version
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
WARNING: Node v18.16.0 is not tested against Ember CLI on your platform. We recommend that you use the most-recent "Active LTS" version of Node.js. See https://git.io/v7S5n for details.
ember-cli: 3.27.0
node: 18.16.0
os: linux x64

该版本可从npm获取,那么我如何安装ember-cli 4.12.1?

# npm view ember-cli
ember-cli@4.12.1 | MIT | deps: 93 | versions: 315Command line tool for developing ambitious ember.js appshttps://cli.emberjs.com/release/
......

我还手动从https://registry.npmjs.org/ember-cli/-/ember-cli-4.12.1.tgz下载了tarball并安装了它,但版本仍然是3.27.0。

英文:

When I use npm to install ember-cli 4.12.1 by below command

#npm install -g ember-cli@4.12.1

The install is successful, but I see ember-cli version is 3.27.0

#ember --version
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
WARNING: Node v18.16.0 is not tested against Ember CLI on your platform. We recommend that you use the most-recent "Active LTS" version of Node.js. See https://git.io/v7S5n for details.
ember-cli: 3.27.0
node: 18.16.0
os: linux x64

The version is available from npm, so how can I install ember-cli 4.12.1?

#npm view ember-cli
ember-cli@4.12.1 | MIT | deps: 93 | versions: 315Command line tool for developing ambitious ember.js appshttps://cli.emberjs.com/release/
......

I also manually download tarball from https://registry.npmjs.org/ember-cli/-/ember-cli-4.12.1.tgz and installed the tarball, but the version still is 3.27.0

答案1

得分: 2

如果您在已经安装了ember-cli的项目中运行全局的embernpx ember-cli,它将延迟到该项目中本地安装的版本。

您需要更改项目的package.json中的ember-cli版本以进行升级。

英文:

if you're running (global) ember or npx ember-cli in a project that already has ember-cli installed, it'll defer to the locally installed versioned for that project.

you'll want to change the ember-cli version in your projects package.json to upgrade.

huangapple
  • 本文由 发表于 2023年5月26日 11:23:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/76337461.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定