Giter Site home page Giter Site logo

Comments (5)

leohxj avatar leohxj commented on June 16, 2024

does your module use in renderer or main?

native dependencies works with main process.

from electron-react-boilerplate.

leohxj avatar leohxj commented on June 16, 2024

and flowbite-react is looks like a UI framework, it has native dependency?
image

from electron-react-boilerplate.

SamHoque avatar SamHoque commented on June 16, 2024

I am using it in the renderer

from electron-react-boilerplate.

SamHoque avatar SamHoque commented on June 16, 2024

Yes, its an UI Library thats why I am confused on the error.

from electron-react-boilerplate.

keemtj avatar keemtj commented on June 16, 2024

@SamHoque

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.