vue-cli init | [.babelrc] Missing helper: "if_or"

Created on 7 Feb 2018  路  6Comments  路  Source: vuejs/vue-cli

Version

3.0.0-alpha.9

Reproduction link

https://d2ffutrenqvap3.cloudfront.net/items/0X3h1G1G381I163G1N3t/Image%202018-02-07%20at%202.50.42%20pm.png?v=a31218fa

Steps to reproduce

vue init webpack common

(enter till the end)

What is expected?

Generate the project

What is actually happening?

vue-cli 路 [.babelrc] Missing helper: "if_or"

Most helpful comment

the same error, use yarn global add @vue/cli

use npm install -g @vue/cli is ok

All 6 comments

Can't reproduce. I used the exact same prompt options and it works as expected. This seems quite weird because the helper is obviously defined and it's been there for over a month.

Likely a cache related issue, looks like your network fetched some outdated files.

I uninstalled my node, yarn, vue-cli and all related dependencies and installed again, the problem still is happening.

Here is others with the same problem than me:

https://github.com/vuejs-templates/webpack/issues/1188
https://github.com/vuejs/vue-cli/issues/627

Any idea?

Solved.

https://github.com/yarnpkg/yarn/issues/1321

I was trying to install vue-cli via yarn, but have been unsuccessful.

@andersonaguiar does it means vue-cli can't be installed via yarn? Installation for me is "successful" (minor some errors). But then vue init fails at the step you said.

Yeah, same deal here, it seems that vue-cli can't be installed via Yarn. Uninstalling it and reinstalling via npm works fine.

the same error, use yarn global add @vue/cli

use npm install -g @vue/cli is ok

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JIANGYUJING1995 picture JIANGYUJING1995  路  3Comments

joshuajohnson814 picture joshuajohnson814  路  3Comments

miyamoto-san picture miyamoto-san  路  3Comments

PrimozRome picture PrimozRome  路  3Comments

Gonzalo2683 picture Gonzalo2683  路  3Comments