Search code examples
vue.jscloud9-ide

Babel Errors in Cloud 9 IDE


Getting a bunch of babel errors when running npm run dev with the Vue cli.

enter image description here

This only happens in Cloud9.

Any thoughts on what could be the issue or how to disable errors like this before running npm run dev?

All babel related it looks like.


Solution

  • I couldn't re-create the babel error messages but it's possible that it could be caused if npm/node is not up-to-date. (Vue-cli wasn't starting dev server before the installation below)

    Is your repository public where you're getting the error messages? Then I could have a look at the errors.

    If removing node_modules folder is not helping, here is how you can create a new IDE workspace for vue.js ($ for commands in bash terminal):

    1. Create a blank Ubuntu workspace
    2. Check that nvm is installed & up-to-date with (check version of install script here):

      $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash

    3. $ nvm install node 6

    4. $ npm i vue-cli -g
    5. $ vue init webpack yourAppName
    6. $ cd yourAppName
    7. $ npm install
    8. $ npm run dev
    9. Click preview to test that Vue server is running as expected

    Here is a link to a HelloWorld Vue app in cloud9 ide.

    If you have an existing app you can also use git to clone it into your new workspace instead of creating a new app.