【发布时间】:2017-12-17 01:19:04
【问题描述】:
我有全栈应用程序,带有 express 和默认 vue-webpack-boilerplate。 我的项目结构如下:
├── 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
└── ...
当我运行$ node client/build/dev-server.js 时收到此错误:
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
但只有当我尝试从客户端文件夹运行它时它才能正常工作。
$ cd client
$ node build/dev-server.js
有什么建议吗?
【问题讨论】: