Solution 1

You need to update the following libraries to avoid Webpack 5 errors while working in Oasis environment.

Just run the following script:

npm i @vue/cli-plugin-babel@^4 @vue/cli-plugin-eslint@^4 @vue/cli-plugin-pwa@^4 @vue/cli-plugin-router@^4 @vue/cli-plugin-unit-jest@^4 @vue/cli-plugin-vuex@^4 @vue/cli-service@^4 sass-loader@^10 -D

Then in the vue.config.js file at the root of the project, replace the content with the following:

/*
|-public
|-src
|-tests
|.npmrc
...
|vue.config.js
*/

const path = require('path');

module.exports = {
  publicPath: './',
  configureWebpack: {
    resolve: {
      alias: {
        '@': path.resolve(__dirname, 'src/'),
      },
    },
  },
};

Solution 2

If Solution 1 does not work, please try by installing the following:

npm install babel-core@^7.0.0-bridge.0

Then try again running your app or tests and it should work.