Skip to content

Vue CLI & Babel #116

@lynsei

Description

@lynsei

Describe the bug
I had not upgraded my VueCLI with the Babel presets because I had forgotten and was getting strange errors. For those who are unfamilliar with Babel and the plugin for the VueCLI, or who have never set up this sort of software before, it might be usedful to improve the automation script, or reference these steps... because the errors were deep in the node modules directories like:

 ERROR  Failed to compile with 6 errors                                                2:21:53 PM

These dependencies were not found:

* core-js/modules/es.error.cause.js in /monorepos/tauri/guijs/node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!/monorepos/tauri/guijs/node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!/monorepos/tauri/guijs/node_modules/cache-loader/dist/cjs.js??ref--0-0!/monorepos/tauri/guijs/node_modules/vue-loader/lib??vue-loader-options!/monorepos/tauri/guijs/node_modules/@guijs/frontend-ui/components/Error.vue?vue&type=script&lang=js&

The steps below are the exact steps I needed in order to get the front-end functional with the backend on Ubuntu Bionic in a Fish environment.

To Fix it I had to...

# from anywhere
yarn global add @vue/cli

# from ./ directory relative path
yarn run autoinstall;
cd ./packages/@guijs/frontend-core/; vue upgrade babel;
pushd . ; cd ./packages/@guijs/native-dialog/ ; yarn; yarn install; yarn build; popd ;
pushd . ; cd ./packages/@guijs/get-workspaces/ ; yarn; yarn install; yarn build; popd ;
pushd . ; cd ./packages/@guijs/server-core/ ; yarn; yarn install; yarn build; yarn dev; popd ;
cd monorepos/tauri/guijs/node_modules/@vue/cli-plugin-babel/; yarn install;
cd monorepos/tauri/guijs/node_modules/@vue/cli-plugin-babel/node_modules/core-js; npm install;
cd /monorepos/tauri/guijs/node_modules/core-js; npm install;
cd /monorepos/tauri/guijs/node_modules/fbjs/node_modules/core-js; npm install;
cd /monorepos/tauri/guijs/; yarn install; yarn autoinstall;
pushd . ; cd ./packages/@guijs/frontend-core/; yarn; yarn install; yarn serve; popd ;

Additional context
This happened in a VM on Ubuntu Bionic using Fish 3.3.1+. Node 14+

Hope this helps somebody!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions