打包的electron app未检测到未将node.js文件打包到目录外

打包的electron app未检测到未将node.js文件打包到目录外,electron,electron-packager,Electron,Electron Packager,我使用的是Node.js、Express.js、Electron.js和Angular。节点服务器在作为angular应用程序运行时工作正常,在作为electron应用程序运行时也工作正常。Node.js服务器位于electron文件夹之外,但在main.js中,我已指定了该文件夹的相对路径 下面是文件夹结构 File Manager │ ├── client // angular and electron │ │ │ ├── node_modules

我使用的是
Node.js
Express.js
Electron.js
Angular
。节点服务器在作为angular应用程序运行时工作正常,在作为electron应用程序运行时也工作正常。Node.js服务器位于electron文件夹之外,但在
main.js
中,我已指定了该文件夹的相对路径

下面是文件夹结构

File Manager
│
├── client                   // angular and electron
│   │
│   ├── node_modules         // angular and electron
│   ├── src                  // angular
│   ├── main.js              // electron
│   └── package.json         // angular and electron
│
└── server                   // node.js
    │
    ├── node_modules         // node.js
    ├── index.js             // node.js
    └── package.json         // node.js
main.js
中,我使用相对路径访问位于electron目录之外的服务器文件夹中的
node.js/express.js
服务器

const expressApp = require('../server/index');
打包时,只有
客户机
文件夹(角度/电子源)中的内容将进入输出构建。
server
文件夹被忽略,当我尝试运行
exe
时,抛出一个错误,应用程序不会开始说
找不到模块“../server/index”

我可以将
服务器
源代码移动到
客户端
文件夹中并使其工作,但是,有没有办法不将
服务器
文件夹移动到
客户端
文件夹中