英文:
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
的项目中运行全局的ember
或npx 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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论