Vuejs webpack relative modules not found
I have a full stack app with express and standard vue-webpack template. My project structure looks like this:
├── client
│ ├── build
│ │ └── ...
│ ├── config
│ │ └── ...
│ ├── dist
| | └── ...
│ ├── index.html
│ ├── src
│ │ ├── App.vue
│ │ ├── assets
│ │ │ └── ...
│ │ ├── components
│ │ │ └── ...
│ │ ├── main.js
│ │ └── router
│ └── static
├── node_modules
├── package.json
└── server
├── app.js
├── bin
│ └── www
└── routes
└── ...
When I run $ node client/build/dev-server.js
I get this error:
ERROR Failed to compile with 2 errors
These relative modules were not found:
* ./build/dev-client in multi ./build/dev-client ./src/main.js
* ./src/main.js in multi ./build/dev-client ./src/main.js
but only if I try to run it from the client folder it works correctly.
$ cd client
$ node build/dev-server.js
any suggestions?
+3
source to share