electron-react-boilerplate / electron-react-boilerplate/electron-react-boilerplate

I can't succeed to build my electron app using sequelize and sqlite

Closed
#3,343 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
TypeScript
Stars
24.3k
Forks
4k
Avg merge
20m
Merged PRs (30d)
4

Description

## Summary

Everything works fine in development, problem is when I try to build it for production.
I am using sequelize and sqlite3 and I've added both to my `release/app` package.json folder.

```
"dependencies": {
"sequelize": "^6.25.2",
"serialport": "^10.4.0",
"sqlite3": "^5.1.2"
}
```

When I try to start the app I get the following error
![image](https://user-images.githubusercontent.com/29161725/196434840-13a88a02-e0e7-422e-8455-2ceb867ba4e6.png)

That file is in another folder that I created, inside src folder `src/models`

And I've added a new config file to webpack for that folder

```
devtool: 'source-map',

mode: 'production',

target: 'electron-main',

entry: {
lagerplatz: path.join(webpackPaths.modelsPath, 'lagerplatz.ts'),
products: path.join(webpackPaths.modelsPath, 'products.ts'),
setting: path.join(webpackPaths.modelsPath, 'setting.ts'),
},

output: {
path: webpackPaths.distModelsPath,
filename: '[name].js',
library: {
type: 'umd',
},
},
```

And it is added to the dist folder

![image](https://user-images.githubusercontent.com/29161725/196435417-96a321e1-9e1f-42cf-9555-c972e92306da.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.