Comments (5)
does your module use in renderer or main?
native dependencies works with main process.
from electron-react-boilerplate.
and flowbite-react is looks like a UI framework, it has native dependency?
from electron-react-boilerplate.
I am using it in the renderer
from electron-react-boilerplate.
Yes, its an UI Library thats why I am confused on the error.
from electron-react-boilerplate.
Hi, I encountered a similar issue where a native package wasn't working as expected(other package. not yours). To resolve this, I installed the native-addon-loader package as a devDependency in the root package.json and modified the webpack files. Below is the relevant code:
// webpack.config.main.prod.ts
// and
// webpack.config.renderer.dev.ts
{
...
module: {
...
rules: [
{
test: /\.node$/,
use: 'native-addon-loader',
},
],
},
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json', '.node'],
},
}
By adding this configuration to both webpack.config.main.prod.ts
and webpack.config.renderer.dev.ts
, the commands npm run start
and npm run package
now work well.
I hope this experience proves helpful.
from electron-react-boilerplate.
Related Issues (20)
- dll renderer webpack error on tiptap npm install HOT 1
- Can't import child_process
- Removing unnecessary electron languages
- how do i add encryption to my saved file with electron-store
- Issue in package of boilorplate
- Build Electron-React-Boilerplate With Tailwindcss
- Relaunch Electron App
- Code signing issue
- How to debug in VS code? HOT 3
- Cli Truncate Package Missing
- An unhandled rejection has occurred inside Forge: TypeError: Cannot read properties of undefined (reading 'split') HOT 1
- request HOT 3
- React Router NavLink not working HOT 1
- How can I use getMac, address or any other Node Module?
- Passing command-line arguments to electron HOT 1
- I want to bundle Selenium but WebPack can't find it(?)
- I can not use javascript files by alias reference in the boilerplate project
- What should the expected win-unpacked size be? HOT 1
- Importing custom native addon
- how to enable redux devtools extension in production
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-react-boilerplate.