W
W
WEBBUR2020-11-11 14:39:05
webpack
WEBBUR, 2020-11-11 14:39:05

Project in GoLang. Error running npm run dev: This relative module was not found. How to fix?

There is a project on GoLang. When I try to build (npm run dev) I get the following:

> vue-cli-service build --watch

⠼  Building for development...

 ERROR  Failed to compile with 1 errors                                                                                                                                               2:17:36 PM

This relative module was not found:

* ./src/main.js in multi ./src/main.js
 ERROR  Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! *****@0.1.0 dev: `vue-cli-service build --watch`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ******@0.1.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-11-11T11_17_36_444Z-debug.log


The log contains the following error messages:
error code ELIFECYCLE
21 error errno 1
22 error ******@0.1.0 dev: `vue-cli-service build --watch`
22 error Exit status 1
23 error Failed at the ******@0.1.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.

That is, as I understand it, an error occurred during the execution of vue-cli-service build --watch

Previously, I did not work with webpack, so I ask for help. Here's what I managed to dig up:
In package.json, in the scripts section in dev, the vue-cli-service build --watch command is registered. Which seems to be where the error occurs. The project does not have a main.js file in the src directory. There is such a file in the frontend directory. It imports used modules, Vue, etc. As I understand it, this is the file that the collector is looking for along the src/main.js path. Tell me, please, where can I find the settings to change the path to the file? Searching with find didn't turn up anything suitable. While there is a dist/js/app.js file that has something webpack related, almost all of the lines start with /******/. The only line without this postscript looks like this:
eval("!(function webpackMissingModule() { var e = new Error(\"Cannot find module './src/main.js'\"); e.code = 'MODULE_NOT_FOUND'; throw e; }());\n\n\n//# sourceURL=webpack:///multi_./src/main.js?");

What is this file? It seems that it is automatically generated during some actions. Or maybe I'm digging in the wrong direction at all and this error is solved somehow differently?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question