vue-cli icon indicating copy to clipboard operation
vue-cli copied to clipboard

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

Open rockan007 opened this issue 8 years ago • 10 comments

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?

需手动安装

rockan007 avatar Sep 04 '18 09:09 rockan007

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

haoqunjiang avatar Sep 04 '18 09:09 haoqunjiang

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.

tinymachine avatar Sep 16 '18 20:09 tinymachine

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

Eyongkevin avatar Sep 20 '18 14:09 Eyongkevin

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

HelaGone avatar Nov 27 '18 23:11 HelaGone

@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 avatar Jan 04 '19 00:01 BrenoTeodor-o

@BrenoTeodor-o you're welcome, Happy coding

HelaGone avatar Jan 04 '19 00:01 HelaGone

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]

Number77asa avatar Sep 23 '19 00:09 Number77asa

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

Life saver.

bogdanmoisin avatar Jan 04 '20 05:01 bogdanmoisin

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

why use sudo

x93008 avatar Sep 14 '20 06:09 x93008

Thank you! This helped me get past my npm install --save gh-pages command!

AmandaBoo avatar Jun 25 '21 05:06 AmandaBoo