Codesandbox-client: Stock vue template has a Babel error

Created on 27 Mar 2019  ·  7Comments  ·  Source: codesandbox/codesandbox-client

🐛 bug report

Description of the problem

The stock vue template throws an error. [BABEL] /src/main.js: Invalid Option: corejs is not a valid top-level option. Maybe you meant to use 'targets'? (While processing: "base$0$0")

Link to sandbox: stock vue template

Your Environment

| Software | Name/Version|
| ---------------- | ---------- |
| Сodesandbox | PROD-1553607023-33a33af1a
| Browser | Chrome 73
| Operating System | macOS

🎒 Bundler 🐛 Bug 🚨 ASAP

Most helpful comment

The fix is live and the issue should be resolved! Sorry for the inconvenience, I'll make sure to run our CI check periodically and find a better solution for the env preset.

Thanks for the workaround @AndreasCag, that helped a lot with pinpointing the issue!

Let me know if it's fixed for you, then we can close the issue.

All 7 comments

Same issue. Today I published article about Vue.js form validations and found that all code examples didn't work.

I found fast fix:
Replace this in package.json


    "@vue/cli-plugin-babel": "^3.4.0",
    "@vue/cli-plugin-eslint": "^3.4.0",
    "@vue/cli-service": "^3.4.0",

To this


    "@vue/cli-plugin-babel": "3.4.0",
    "@vue/cli-plugin-eslint": "3.4.0",
    "@vue/cli-service": "3.4.0",

Same issue. Today I published article about Vue.js form validations and found that all code examples didn't work.

I found fast fix:
Replace this in package.json


    "@vue/cli-plugin-babel": "^3.4.0",
    "@vue/cli-plugin-eslint": "^3.4.0",
    "@vue/cli-service": "^3.4.0",

To this


    "@vue/cli-plugin-babel": "3.4.0",
    "@vue/cli-plugin-eslint": "3.4.0",
    "@vue/cli-service": "3.4.0",

It's starting to work properly.but why?

We're looking into this!

Hey! I found the issue, it's related to a recent new release of @vue/cli-plugin-babel. Some new configuration parameters were given to @babel/preset-env since 3.5.2(https://github.com/vuejs/vue-cli/commit/156ef21c4238aa7ec3804db9d3c4817f8f69b209), but our @babel/preset-env installed in the sandbox was too old and threw a validation error.

I installed a new version of preset-env in the sandbox as a temporary solution, that should be live in ~15min. A long-term solution would be to either add support for lockfiles or to use the babel-preset-env provided by @vue/cli.

The fix is live and the issue should be resolved! Sorry for the inconvenience, I'll make sure to run our CI check periodically and find a better solution for the env preset.

Thanks for the workaround @AndreasCag, that helped a lot with pinpointing the issue!

Let me know if it's fixed for you, then we can close the issue.

Closing this, as the lack of feedback signals me this has been solved. Please reopen if that's not the case.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Enjoy2Live picture Enjoy2Live  ·  20Comments

viankakrisna picture viankakrisna  ·  21Comments

MichMich picture MichMich  ·  35Comments

bcbrian picture bcbrian  ·  33Comments

mescalito picture mescalito  ·  65Comments