How to fix "This relative module was not found: * ./src/main.js in multi..." error when trying to npm run serve How to fix "This relative module was not found: * ./src/main.js in multi..." error when trying to npm run serve vue.js vue.js

How to fix "This relative module was not found: * ./src/main.js in multi..." error when trying to npm run serve


I faced a similar issue after and spent hours searching.

The issue occurred in my project when I tried to install vuetify using command vue add vuetify. Apparently, the in automatically changes the app entry property in webpack.config automatically.

You can either change the filename itself to main.js or change the webpack config through vue.config.js (by reading the vue cli documentation regararding webpack config).

You can check your webpack.config by using the command vue inspect.

 ], entry: {   app: [    './src/main.js'   ] }}


I had a similar error, this worked for me but not sure you have the same issue. I found this in one of my webpack configuration files (usually named like webpack.dev.conf.js):

{  test: /\.js$/,  loader: 'babel-loader',  include: [    resolve('src'),     resolve('test'),     resolve('node_modules/webpack-dev-server/client')  ]},

I removed resolve('node_modules/webpack-dev-server/client') and it fixed that issue.


This is an old thread, but I ran across this recently after installing a new module to a Vue project. The problem went away when I updated all my other modules, too.