Vue-cli: [email protected] requires a peer of @babel/core@^7.0.0 but none is installed.

Created on 4 Sep 2018  ·  9Comments  ·  Source: vuejs/vue-cli

Version

3.0.1

Reproduction link

https://github.com/vuejs

Node and OS info

[email protected] requires a peer of @babel/core@^7.0.0 but none is installed.

Steps to reproduce

i created a project,run 'npm install'.showed the info '[email protected] requires a peer of @babel/core@^7.0.0 but none is installed.'

What is expected?

@babel/core 项目依赖安装完毕

What is actually happening?

需手动安装

Most helpful comment

You may need to install Babel this way, as of Babel 7: npm install --save-dev @babel/core @babel/preset-env

All 9 comments

只是 warning,不影响实际使用。项目中实际有安装 @babel/core v7.0.0-beta.47。
等我们升级至 babel 7.0 正式版后这个 warning 就会消掉的。

In case it's helpful to others, here's a lightly edited version of Google's English translation of @sodatea's message above:

This is just a warning; it does not affect actual use. @babel/core v7.0.0-beta.47 is actually installed in the project. This warning will be eliminated after we upgrade to the official version of babel 7.0.

Thank you @sodatea for the response and @tinymachine for the translation.

You may need to install Babel this way, as of Babel 7: npm install --save-dev @babel/core @babel/preset-env

@HelaGone Thankyou a lot for sharing this, I was looking for a solution for hours and your suggestion just save my life here! 😄

@BrenoTeodor-o you're welcome, Happy coding

Well, in most cases you shouldn't ignore this; the issue arises from babel having so many package versions (babel 6, babel 7; etc.)
Here is a reference: https://nuget.qite.be/feeds/NPM/babel-core/7.0.0-bridge.0
solution for me was: sudo npm install --save-dev [email protected]

You may need to install Babel this way, as of Babel 7: npm install --save-dev @babel/core @babel/preset-env

Life saver.

sudo npm install --save-dev [email protected]

why use sudo

Was this page helpful?
0 / 5 - 0 ratings