A Foundation for Scalable Cross-Platform Apps

Overview


Electron React Boilerplate uses Electron, React, React Router, Webpack and React Fast Refresh.


Build Status Dependency Status DevDependency Status Github Tag

OpenCollective OpenCollective Good first issues open StackOverflow

Install

  • If you have installation or compilation issues with this project, please see our debugging guide

First, clone the repo via git and install dependencies:

git clone --depth 1 --single-branch https://github.com/electron-react-boilerplate/electron-react-boilerplate.git your-project-name
cd your-project-name
yarn

Starting Development

Start the app in the dev environment:

yarn start

Packaging for Production

To package apps for the local platform:

yarn package

Docs

See our docs and guides here

Donations

Donations will ensure the following:

  • πŸ”¨ Long term maintenance of the project
  • πŸ›£ Progress on the roadmap
  • πŸ› Quick responses to bug reports and help requests

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

Maintainers

License

MIT Β© Electron React Boilerplate

Issues
  • Problem with native modules in renderer process using erb4.1.0

    Problem with native modules in renderer process using erb4.1.0

    Hey,

    I just started a new project with the latest electron-react-boilerplate on main branch. I need a native module on the renderer process (serialport), so I followed the instructions to 'opt-in to node intgeration' here.

    Now when I start the app I get the following error:

    Loading non-context-aware native module in renderer.... but app.allowRendererProcessReuse is true. See https://github.com/electron/electron/issues/18397.

    I have used this option before to use native modules, but as far as I'm aware this has been removed from the latest version of electron. That would make sense as I cannot set it in main.ts (allowRendererProcessReuse does not exist on type App).

    How do I resolve this?

    Many thanks

    question 
    opened by mttjcksn 0
  • Display local videos in dev environment (webpack)

    Display local videos in dev environment (webpack)

    Summary

    I am refactoring https://autoEdit.io to use this boilerplate (https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/1106#issuecomment-942828441), it's an app for text based video editing, it uses ffmpeg under the hood, and needs access to audio and video files stored on the user's application data path folder.

    However in development, because of how the app is served with webpack, it fails to show the files, because if appends the absolute file system app to the localhost url, creating an incorrect resource location.

    I do realize is a bit a niche use case, but was wondering if anyone else has had a similar use case, and might have found a workaround?


    updated

    I found this on stackoverflow "Webpack Build Not Rendering HTML5 Video" , and tried adding this to webpack webpack.config.renderer.dev.ts

     {
            test: /\.(mov|mp4)$/, use: [
              {
                loader: 'file-loader',
                options: {
                  name: '[path][name].[ext]'
                }
              }
            ]
          },
    

    It adds the correct path to the src of the video element, but the media doesn't play. I guess that might be because in development it's still served via webpack local server and that might not be able to serve static assets on the user's system?

    question 
    opened by pietrop 0
  • Problem importing css as module

    Problem importing css as module

    Prerequisites

    • [x] Using npm
    • [x] Using an up-to-date main branch
    • [x] Using latest version of devtools. Check the docs for how to update
    • [x] Tried solutions mentioned in #400
    • [x] For issue in production release, add devtools output of DEBUG_PROD=true npm run build && npm start

    Expected Behavior

    Say I have a css file visualizationStyles.css containing a .visualization rule.

    I believe in the past this worked (in some lateral .tsx file):

    import styles from './visualizationStyles.css';
    
    export default function Visualization() {
      return <div className={styles.visualization}>stuff</div>;
    }
    

    Current Behavior

    Now import 'visualizationStyles.css' works, but importing it as a usable module generates this error:

    Cannot find module './visualizationStyles.css' or its corresponding type declarations
    

    Same goes for import styles from './App.global.css' in App.tsx.

    Steps to Reproduce

    (see expected behavior)

    Possible Solution (Not obligatory)

    Context

    Your Environment

    • Node version : 14.18.1
    • electron-react-boilerplate version or branch : 1.3.1
    • Operating System and version: Windows 10 Home, version 21H1
    bug 
    opened by timsgardner 0
  • How to share code between main and renderer?

    How to share code between main and renderer?

    Summary

    I want to share some types and utility functions between my main process and renderer process, but when I try to import something from src/renderer inside src/main there is an error while building the app for development.

    question 
    opened by ceoshikhar 1
  • remove the use of explicit import of  React in jsx files

    remove the use of explicit import of React in jsx files

    Since React 17 and TypeScript 4.1 you can safely remove the use of React import in JSX files.

    opened by area73 0
  • Installing Puppeteer causing a ton of errors

    Installing Puppeteer causing a ton of errors

    Prerequisites

    • [ X ] Using npm
    • [ X ] Using an up-to-date main branch
    • [ X ] Using latest version of devtools. Check the docs for how to update
    • [ X ] Tried solutions mentioned in #400
    • [ X ] For issue in production release, add devtools output of DEBUG_PROD=true npm run build && npm start

    Expected Behavior

    Puppeteer would work...

    Current Behavior

    ERROR in ./node_modules/fd-slicer/index.js 1:9-22
    Module not found: Error: Can't resolve 'fs' in '...\node_modules\fd-slicer'
    ERROR in ./node_modules/fd-slicer/index.js 2:11-26
    Module not found: Error: Can't resolve 'util' in '...\node_modules\fd-slicer'
    ERROR in ./node_modules/fd-slicer/index.js 3:13-30
    Module not found: Error: Can't resolve 'stream' in '...\node_modules\fd-slicer'
    ERROR in ./node_modules/fs-constants/browser.js 1:0-37
    Module not found: Error: Can't resolve 'constants' in '...\node_modules\fs-constants'
    ERROR in ./node_modules/fs.realpath/index.js 8:9-22
    Module not found: Error: Can't resolve 'fs' in '...\node_modules\fs.realpath'
    ERROR in ./node_modules/fs.realpath/old.js 22:17-32
    Module not found: Error: Can't resolve 'path' in '...\node_modules\fs.realpath'
    ERROR in ./node_modules/fs.realpath/old.js 24:9-22
    Module not found: Error: Can't resolve 'fs' in '...\node_modules\fs.realpath'
    ERROR in ./node_modules/glob/common.js 13:11-26
    Module not found: Error: Can't resolve 'path' in '...\node_modules\glob'
    ERROR in ./node_modules/glob/glob.js 43:9-22
    Module not found: Error: Can't resolve 'fs' in '...\node_modules\glob'
    ERROR in ./node_modules/glob/glob.js 49:11-26
    Module not found: Error: Can't resolve 'path' in '...\node_modules\glob'
    ERROR in ./node_modules/glob/glob.js 50:13-30
    Module not found: Error: Can't resolve 'assert' in '...\node_modules\glob'
    ERROR in ./node_modules/glob/glob.js 57:11-26
    Module not found: Error: Can't resolve 'util' in '...\node_modules\glob'
    ERROR in ./node_modules/glob/sync.js 4:9-22
    Module not found: Error: Can't resolve 'fs' in '...\node_modules\glob'
    ERROR in ./node_modules/glob/sync.js 9:11-26
    Module not found: Error: Can't resolve 'util' in '...\node_modules\glob'
    ERROR in ./node_modules/glob/sync.js 10:11-26
    Module not found: Error: Can't resolve 'path' in '...\node_modules\glob'
    ERROR in ./node_modules/glob/sync.js 11:13-30
    Module not found: Error: Can't resolve 'assert' in '...\node_modules\glob'
    ERROR in ./node_modules/https-proxy-agent/dist/agent.js 15:30-44
    Module not found: Error: Can't resolve 'net' in '...\node_modules\https-proxy-agent\dist'
    ERROR in ./node_modules/https-proxy-agent/dist/agent.js 16:30-44
    Module not found: Error: Can't resolve 'tls' in '...\node_modules\https-proxy-agent\dist'
    ERROR in ./node_modules/https-proxy-agent/dist/agent.js 18:33-50
    Module not found: Error: Can't resolve 'assert' in '...\node_modules\https-proxy-agent\dist'
    ERROR in ./node_modules/mkdirp/index.js 1:11-26
    Module not found: Error: Can't resolve 'path' in '...\node_modules\mkdirp'
    ERROR in ./node_modules/mkdirp/index.js 2:9-22
    Module not found: Error: Can't resolve 'fs' in '...\node_modules\mkdirp'
    ERROR in ./node_modules/path-exists/index.js 2:11-24
    Module not found: Error: Can't resolve 'fs' in '...\node_modules\path-exists'
    ERROR in ./node_modules/path-exists/index.js 3:20-35
    Module not found: Error: Can't resolve 'util' in '...\node_modules\path-exists'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/common/JSHandle.js 520:69-84
    Module not found: Error: Can't resolve 'path' in '...\node_modules\puppeteer\lib\cjs\puppeteer\common'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/common/helper.js 269:73-90
    Module not found: Error: Can't resolve 'stream' in '...\node_modules\puppeteer\lib\cjs\puppeteer\common'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/common/helper.js 302:63-76
    Module not found: Error: Can't resolve 'fs' in '...\node_modules\puppeteer\lib\cjs\puppeteer\common'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js 41:24-37
    Module not found: Error: Can't resolve 'os' in '...\node_modules\puppeteer\lib\cjs\puppeteer\node'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js 42:24-37
    Module not found: Error: Can't resolve 'fs' in '...\node_modules\puppeteer\lib\cjs\puppeteer\node'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js 43:26-41
    Module not found: Error: Can't resolve 'path' in '...\node_modules\puppeteer\lib\cjs\puppeteer\node'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js 44:26-41
    Module not found: Error: Can't resolve 'util' in '...\node_modules\puppeteer\lib\cjs\puppeteer\node'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js 45:34-58
    Module not found: Error: Can't resolve 'child_process' in '...\node_modules\puppeteer\lib\cjs\puppeteer\node'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js 46:27-43
    Module not found: Error: Can't resolve 'https' in '...\node_modules\puppeteer\lib\cjs\puppeteer\node'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js 47:26-41
    Module not found: Error: Can't resolve 'http' in '...\node_modules\puppeteer\lib\cjs\puppeteer\node'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js 43:34-58
    Module not found: Error: Can't resolve 'child_process' in '...\node_modules\puppeteer\lib\cjs\puppeteer\node'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js 49:30-49
    Module not found: Error: Can't resolve 'readline' in '...\node_modules\puppeteer\lib\cjs\puppeteer\node'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js 51:15-30
    Module not found: Error: Can't resolve 'util' in '...\node_modules\puppeteer\lib\cjs\puppeteer\node'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/node/Launcher.js 37:24-37
    Module not found: Error: Can't resolve 'os' in '...\node_modules\puppeteer\lib\cjs\puppeteer\node'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/node/Launcher.js 38:26-41
    Module not found: Error: Can't resolve 'path' in '...\node_modules\puppeteer\lib\cjs\puppeteer\node'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/node/Launcher.js 39:24-37
    Module not found: Error: Can't resolve 'fs' in '...\node_modules\puppeteer\lib\cjs\puppeteer\node'
    ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/node/Launcher.js 44:15-30
    Module not found: Error: Can't resolve 'util' in '...\node_modules\puppeteer\lib\cjs\puppeteer\node'
    ERROR in ./node_modules/puppeteer/node_modules/extract-zip/index.js 3:44-57
    Module not found: Error: Can't resolve 'fs' in '...\node_modules\puppeteer\node_modules\extract-zip'
    ERROR in ./node_modules/puppeteer/node_modules/extract-zip/index.js 5:13-28
    Module not found: Error: Can't resolve 'path' in '...\node_modules\puppeteer\node_modules\extract-zip'
    ERROR in ./node_modules/puppeteer/node_modules/extract-zip/index.js 6:22-37
    Module not found: Error: Can't resolve 'util' in '...\node_modules\puppeteer\node_modules\extract-zip'
    ERROR in ./node_modules/puppeteer/node_modules/extract-zip/index.js 7:15-32
    Module not found: Error: Can't resolve 'stream' in '...\node_modules\puppeteer\node_modules\extract-zip'
    ERROR in ./node_modules/puppeteer/node_modules/find-up/index.js 2:13-28
    Module not found: Error: Can't resolve 'path' in '...\node_modules\puppeteer\node_modules\find-up'
    ERROR in ./node_modules/puppeteer/node_modules/get-stream/buffer-stream.js 2:41-58
    Module not found: Error: Can't resolve 'stream' in '...\node_modules\puppeteer\node_modules\get-stream'
    ERROR in ./node_modules/puppeteer/node_modules/locate-path/index.js 2:13-28
    Module not found: Error: Can't resolve 'path' in '...\node_modules\puppeteer\node_modules\locate-path'
    ERROR in ./node_modules/puppeteer/node_modules/locate-path/index.js 3:11-24
    Module not found: Error: Can't resolve 'fs' in '...\node_modules\puppeteer\node_modules\locate-path'
    ERROR in ./node_modules/puppeteer/node_modules/locate-path/index.js 4:20-35
    Module not found: Error: Can't resolve 'util' in '...\node_modules\puppeteer\node_modules\locate-path'
    ERROR in ./node_modules/puppeteer/node_modules/pkg-dir/index.js 2:13-28
    Module not found: Error: Can't resolve 'path' in '...\node_modules\puppeteer\node_modules\pkg-dir'
    ERROR in ./node_modules/rimraf/rimraf.js 1:15-32
    Module not found: Error: Can't resolve 'assert' in '...\node_modules\rimraf'
    ERROR in ./node_modules/rimraf/rimraf.js 2:13-28
    Module not found: Error: Can't resolve 'path' in '...\node_modules\rimraf'
    ERROR in ./node_modules/rimraf/rimraf.js 3:11-24
    Module not found: Error: Can't resolve 'fs' in '...\node_modules\rimraf'
    ERROR in ./node_modules/tar-fs/index.js 5:9-22
    Module not found: Error: Can't resolve 'fs' in '...\node_modules\tar-fs'
    ERROR in ./node_modules/tar-fs/index.js 6:11-26
    Module not found: Error: Can't resolve 'path' in '...\node_modules\tar-fs'
    ERROR in ./node_modules/tar-fs/index.js 7:9-22
    Module not found: Error: Can't resolve 'os' in '...\node_modules\tar-fs'
    ERROR in ./node_modules/tar-fs/node_modules/chownr/chownr.js 2:11-24
    Module not found: Error: Can't resolve 'fs' in '...\node_modules\tar-fs\node_modules\chownr'
    ERROR in ./node_modules/tar-fs/node_modules/chownr/chownr.js 3:13-28
    Module not found: Error: Can't resolve 'path' in '...\node_modules\tar-fs\node_modules\chownr'
    ERROR in ./node_modules/tar-stream/extract.js 1:11-26
    Module not found: Error: Can't resolve 'util' in '...\node_modules\tar-stream'
    ERROR in ./node_modules/through/index.js 1:13-30
    Module not found: Error: Can't resolve 'stream' in '...\node_modules\through'
    ERROR in ./node_modules/yauzl/index.js 1:9-22
    Module not found: Error: Can't resolve 'fs' in '...\node_modules\yauzl'
    ERROR in ./node_modules/yauzl/index.js 2:11-26
    Module not found: Error: Can't resolve 'zlib' in '...\node_modules\yauzl'
    ERROR in ./node_modules/yauzl/index.js 5:11-26
    Module not found: Error: Can't resolve 'util' in '...\node_modules\yauzl'
    ERROR in ./node_modules/yauzl/index.js 7:16-43
    Module not found: Error: Can't resolve 'stream' in '...\node_modules\yauzl'
    

    Steps to Reproduce

    1. Install Puppeteer
    $ npm install --save puppeteer
    
    1. Import it and call it in any way.
    const puppeteer = require('puppeteer-core');
    
    (async () => {
      const browser = await puppeteer.launch();
      const page = await browser.newPage();
      await page.goto('https://example.com');
      await page.screenshot({ path: 'example.png' });
    
      await browser.close();
    })();
    

    Possible Solution (Not obligatory)

    Think that it has something to do with WebPack but I'm not sure and not that familiar with it.

    EDIT: Installing the packages that couldn't be resolved fixed some of the errors but it only works on util, stream, constants, path, assert, net, os, zlib, tls and deadline. Using the recommended packages like constants-browserify instead of constants didn't work.

    Context

    I just installed Puppeteer on a new boilerplate and it just doesn't work.

    EDIT: Tried putting them in module.exports like this:

    module.exports = {
      // ...
      resolve: {
        fallback: {
          fs: false, //  require.resolve('fs'), doesn't work either
        },
      },
    };
    

    And it didn't do anything, Installing them fixed some of the errors. (see context)

    Your Environment

    • Node version : 14.17.5
    • electron-react-boilerplate version or branch : 4.0
    • Operating System and version : Windows 10 Pro x64 10.0.19043.1237
    bug 
    opened by StrykeDev 0
  • Module not found while executing .exe file of electron

    Module not found while executing .exe file of electron

    Summary

    Wheh i am doing npm run watch every thing works fine but when I building and running electron .exe file it throws an erroor ../ connect/connect not found but the module id is present in that position

    question 
    opened by Aanandgupta 0
  • feat: Optimize compilation configuration

    feat: Optimize compilation configuration

    The renderer does not seem to need ts to generate commonjs code, which will also optimize the package size to make it smaller

    opened by 1zilc 0
  • Issue with electron-rebuild + native depencies with bufferutil

    Issue with electron-rebuild + native depencies with bufferutil

    Prerequisites

    • [-] Using npm
    • [-] Using an up-to-date main branch
    • [-] Using latest version of devtools. Check the docs for how to update
    • [-] Tried solutions mentioned in #400
    • [-] For issue in production release, add devtools output of DEBUG_PROD=true npm run build && npm start

    Expected Behavior

    Installing modules like "@supabase/supabase-js" should 1.) install into the native directory package.json and 2.) rebuild with electron 3.) project runs

    Current Behavior

    running npm install -s "@supabase/supabase-js" in the native dependency directory installs the dependency but throws the below error during the electron-rebuild process:

    `$ yarn electron-rebuild && yarn link-modules yarn run v1.22.10 $ node -r ../../.erb/scripts/babel-register.js ../../.erb/scripts/electron-rebuild.js ⠏ Building modules: 0/2Makefile:343: *** missing separator. Stop. Makefile:343: *** missing separator. Stop. βœ– Rebuild Failed

    An unhandled error occurred inside electron-rebuild node-gyp failed to rebuild '/Users/macbookpro/Documents/My-Company/app/app-desktop/build/app/node_modules/utf-8-validate'. For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

    Error: make failed with exit code: 2

    Error: node-gyp failed to rebuild '/Users/macbookpro/Documents/My-Company/app/app-desktop/build/app/node_modules/utf-8-validate'. For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

    Error: make failed with exit code: 2

    at NodeGyp.rebuildModule (/Users/macbookpro/Documents/My-Company/app/app-desktop/node_modules/electron-rebuild/lib/src/module-type/node-gyp.js:109:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ModuleRebuilder.rebuildNodeGypModule (/Users/macbookpro/Documents/My-Company/app/app-desktop/node_modules/electron-rebuild/lib/src/module-rebuilder.js:94:9)
    at async Rebuilder.rebuildModuleAt (/Users/macbookpro/Documents/My-Company/app/app-desktop/node_modules/electron-rebuild/lib/src/rebuild.js:226:9)
    at async Promise.all (index 177)
    at async Rebuilder.rebuild (/Users/macbookpro/Documents/My-Company/app/app-desktop/node_modules/electron-rebuild/lib/src/rebuild.js:180:13)
    at async /Users/macbookpro/Documents/My-Company/app/app-desktop/node_modules/electron-rebuild/lib/src/cli.js:154:9
    

    node:child_process:903 throw err; ^

    Error: Command failed: ../../node_modules/.bin/electron-rebuild --parallel --force --types prod,dev,optional --module-dir . at checkExecSyncError (node:child_process:826:11) at execSync (node:child_process:900:15) at Object. (/Users/macbookpro/Documents/My-Company/app/app-desktop/.erb/scripts/electron-rebuild.js:17:3) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Module._compile (/Users/macbookpro/Documents/My-Company/app/app-desktop/node_modules/pirates/lib/index.js:99:24) [email protected] app % yarn yarn install v1.22.10 [1/4] πŸ” Resolving packages... success Already up-to-date. $ yarn electron-rebuild && yarn link-modules yarn run v1.22.10 $ node -r ../../.erb/scripts/babel-register.js ../../.erb/scripts/electron-rebuild.js β ‡ Building modules: 0/2 CC(target) Release/obj.target/bufferutil/src/bufferutil.o CC(target) Release/obj.target/bufferutil/src/bufferutil.o β Ή Building modules: 0/2error: /Library/Developer/CommandLineTools/usr/bin/lipo: can't move temporary file: Release/obj.target/bufferutil/src/bufferutil.o to file: Release/obj.target/bufferutil/src/bufferutil.o.lipo (No such file or directory) clang: error: lipo command failed with exit code 1 (use -v to see invocation) make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1 βœ– Rebuild Failed

    An unhandled error occurred inside electron-rebuild node-gyp failed to rebuild '/Users/macbookpro/Documents/My-Company/app/app-desktop/build/app/node_modules/bufferutil'. For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

    Error: make failed with exit code: 2

    Error: node-gyp failed to rebuild '/Users/macbookpro/Documents/My-Company/app/app-desktop/build/app/node_modules/bufferutil'. For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

    Error: make failed with exit code: 2

    at NodeGyp.rebuildModule (/Users/macbookpro/Documents/My-Company/app/app-desktop/node_modules/electron-rebuild/lib/src/module-type/node-gyp.js:109:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ModuleRebuilder.rebuildNodeGypModule (/Users/macbookpro/Documents/My-Company/app/app-desktop/node_modules/electron-rebuild/lib/src/module-rebuilder.js:94:9)
    at async Rebuilder.rebuildModuleAt (/Users/macbookpro/Documents/My-Company/app/app-desktop/node_modules/electron-rebuild/lib/src/rebuild.js:226:9)
    at async Promise.all (index 91)
    at async Rebuilder.rebuild (/Users/macbookpro/Documents/My-Company/app/app-desktop/node_modules/electron-rebuild/lib/src/rebuild.js:180:13)
    at async /Users/macbookpro/Documents/My-Company/app/app-desktop/node_modules/electron-rebuild/lib/src/cli.js:154:9
    

    node:child_process:903 throw err; ^

    Error: Command failed: ../../node_modules/.bin/electron-rebuild --parallel --force --types prod,dev,optional --module-dir . at checkExecSyncError (node:child_process:826:11) at execSync (node:child_process:900:15) at Object. (/Users/macbookpro/Documents/My-Company/app/app-desktop/.erb/scripts/electron-rebuild.js:17:3) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Module._compile (/Users/macbookpro/Documents/My-Company/app/app-desktop/node_modules/pirates/lib/index.js:99:24) at Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Object.newLoader [as .js] (/Users/macbookpro/Documents/My-Company/app/app-desktop/node_modules/pirates/lib/index.js:104:7) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12) { status: 255, signal: null, output: [ null, null, null ], pid: 39612, stdout: null, stderr: null } error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. SOLINK_MODULE(target) Release/bufferutil.node error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. [email protected] app % clang: error: no such file or directory: 'Release/obj.target/bufferutil/src/bufferutil.o' make: *** [Release/bufferutil.node] Error 1 `

    $ yarn electron-rebuild && yarn link-modules yarn run v1.22.10 $ node -r ../../.erb/scripts/babel-register.js ../../.erb/scripts/electron-rebuild.js ⠏ Building modules: 0/2Makefile:343: *** missing separator. Stop. Makefile:343: *** missing separator. Stop. βœ– Rebuild Failed

    An unhandled error occurred inside electron-rebuild node-gyp failed to rebuild '/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/build/app/node_modules/utf-8-validate'. For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

    Error: make failed with exit code: 2

    Error: node-gyp failed to rebuild '/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/build/app/node_modules/utf-8-validate'. For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

    Error: make failed with exit code: 2

    at NodeGyp.rebuildModule (/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/node_modules/electron-rebuild/lib/src/module-type/node-gyp.js:109:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ModuleRebuilder.rebuildNodeGypModule (/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/node_modules/electron-rebuild/lib/src/module-rebuilder.js:94:9)
    at async Rebuilder.rebuildModuleAt (/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/node_modules/electron-rebuild/lib/src/rebuild.js:226:9)
    at async Promise.all (index 177)
    at async Rebuilder.rebuild (/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/node_modules/electron-rebuild/lib/src/rebuild.js:180:13)
    at async /Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/node_modules/electron-rebuild/lib/src/cli.js:154:9
    

    node:child_process:903 throw err; ^

    Error: Command failed: ../../node_modules/.bin/electron-rebuild --parallel --force --types prod,dev,optional --module-dir . at checkExecSyncError (node:child_process:826:11) at execSync (node:child_process:900:15) at Object. (/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/.erb/scripts/electron-rebuild.js:17:3) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Module._compile (/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/node_modules/pirates/lib/index.js:99:24) [email protected] app % yarn yarn install v1.22.10 [1/4] πŸ” Resolving packages... success Already up-to-date. $ yarn electron-rebuild && yarn link-modules yarn run v1.22.10 $ node -r ../../.erb/scripts/babel-register.js ../../.erb/scripts/electron-rebuild.js β ‡ Building modules: 0/2 CC(target) Release/obj.target/bufferutil/src/bufferutil.o CC(target) Release/obj.target/bufferutil/src/bufferutil.o β Ή Building modules: 0/2error: /Library/Developer/CommandLineTools/usr/bin/lipo: can't move temporary file: Release/obj.target/bufferutil/src/bufferutil.o to file: Release/obj.target/bufferutil/src/bufferutil.o.lipo (No such file or directory) clang: error: lipo command failed with exit code 1 (use -v to see invocation) make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1 βœ– Rebuild Failed

    An unhandled error occurred inside electron-rebuild node-gyp failed to rebuild '/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/build/app/node_modules/bufferutil'. For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

    Error: make failed with exit code: 2

    Error: node-gyp failed to rebuild '/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/build/app/node_modules/bufferutil'. For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

    Error: make failed with exit code: 2

    at NodeGyp.rebuildModule (/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/node_modules/electron-rebuild/lib/src/module-type/node-gyp.js:109:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ModuleRebuilder.rebuildNodeGypModule (/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/node_modules/electron-rebuild/lib/src/module-rebuilder.js:94:9)
    at async Rebuilder.rebuildModuleAt (/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/node_modules/electron-rebuild/lib/src/rebuild.js:226:9)
    at async Promise.all (index 91)
    at async Rebuilder.rebuild (/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/node_modules/electron-rebuild/lib/src/rebuild.js:180:13)
    at async /Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/node_modules/electron-rebuild/lib/src/cli.js:154:9
    

    node:child_process:903 throw err; ^

    Error: Command failed: ../../node_modules/.bin/electron-rebuild --parallel --force --types prod,dev,optional --module-dir . at checkExecSyncError (node:child_process:826:11) at execSync (node:child_process:900:15) at Object. (/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/.erb/scripts/electron-rebuild.js:17:3) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Module._compile (/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/node_modules/pirates/lib/index.js:99:24) at Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Object.newLoader [as .js] (/Users/macbookpro/Documents/Audio-Sundae/sundae/sundae-desktop/node_modules/pirates/lib/index.js:104:7) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12) { status: 255, signal: null, output: [ null, null, null ], pid: 39612, stdout: null, stderr: null } error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. SOLINK_MODULE(target) Release/bufferutil.node error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. [email protected] app % clang: error: no such file or directory: 'Release/obj.target/bufferutil/src/bufferutil.o' make: *** [Release/bufferutil.node] Error 1

    Steps to Reproduce

    1. cd into release/app directory

    2. npm install "@supabase/supabase-js" dependency

    3. view error

    Possible Solution (Not obligatory)

    Context

    Its put a possible stop on using electron-react-boilerplate for our desktop app - we've been using it for like 7 months on this have stopped our dev process. we've tried node-gyp fixes but to no avail.

    Your Environment

    • Node version : v16.10.0
    • Python: Python 3.9.7
    • electron-react-boilerplate version or branch : ^11.5.0
    • Operating System and version : MacOS
    • Link to your project : can share repo directly if needed
    bug 
    opened by lmick002 3
  • feat: Change the MemoryRouter to BrowserRouter

    feat: Change the MemoryRouter to BrowserRouter

    BrowserRouter makes it easier to add routes that can be rewritten using MemoryRouter. eg: Rewriting GET /home to /index.html

    opened by bei-yang 0
Releases(v4.0.0)
Owner
Electron React Boilerplate
Live editing development on desktop app
Electron React Boilerplate
A Foundation for Scalable Cross-Platform Apps

Electron React Boilerplate uses Electron, React, React Router, Webpack and React Fast Refresh. Install If you have installation or compilation issues

Electron React Boilerplate 18.3k Oct 15, 2021
A toolkit for React, Preact, Inferno & vanilla JS apps, React libraries and other npm modules for the web, with no configuration (until you need it)

nwb nwb is a toolkit for: Quick Development with React, Inferno, Preact or vanilla JavaScript Developing: React Apps Preact Apps Inferno Apps Vanilla

Jonny Buchanan 5.4k Oct 14, 2021
πŸͺ A highly scalable, professional boilerplate for building fast, robust and adaptable mern web apps πŸš€

Created by getspooky and maintained with ❀️ by an amazing team of developers. CookieScript Boilerplate uses familiar tools and implements best practic

Yasser A.Idrissi 35 Sep 5, 2021
Highly Scalable Awesome React Starter Kit for an enterprise application with a very easy maintainable codebase. :fire:

React Enterprise Starter Kit ?? Highly Scalable, performant and amazing react boilerplate for react developers to get started and improve web building

Anand gupta 53 Sep 14, 2021
Create-React-App + TypeScript + Ant-Design (without Eject)

This project was bootstrapped with Create React App. Below you will find some information on how to perform common tasks. You can find the most recent

#ΠΊΠΎΠ΄Π΅Ρ€ΠΎΡ‚Π±ΠΎΠ³Π° 111 Sep 13, 2021
React/Redux stack (not a boilerplate kit)

Reactuate Reactuate is an opinionated stack for building React/Redux-based frontend applications with a focus on DDD (Domain-Driven Design). The ratio

null 490 Sep 23, 2021
Example repository for integrating Ant Design with ReactPWA project. This repo demonstrates the usage & integration of Ant Design in existing ReactPWA project.

ReactPWA - PawJS & Ant Design Example repository for integrating Ant Design with ReactPWA project. This repo demonstrates the usage & integration of A

Atyantik 11 Sep 16, 2021
πŸ›‘οΈ βš›οΈ A simple, scalable, and powerful architecture for building production ready React applications.

??️ βš›οΈ A simple, scalable, and powerful architecture for building production ready React applications.

Alan Alickovic 5.2k Oct 16, 2021
πŸ’₯A cross-platform Node.js based CLI that generates boilerplate code for different tailwind web applications.

??A cross-platform Node.js based CLI that generates boilerplate code for different tailwind web applications.

Saad Irfan ⚑️ 223 Oct 5, 2021
πŸš€ The final answer to a React Universal Component: simultaneous SSR + Code Splitting

React Universal Component ?? ?? ?? GIT CLONE 3.0 LOCAL DEMO ?? ?? ?? React Universal Component Intro What makes Universal Rendering so painful Install

James Gillmore 1.7k Oct 16, 2021
An Electron boilerplate featuring typescript, react, webpack, tailwind and redux - ready to use!

A secure, modular, and easy to use Electron Forge boilerplate featuring Typescript, React, Webpack, TailwindCSS, Redux and persistance (with redux-persist support)

Daniel 18 Oct 13, 2021
GraphQL first full-stack starter kit with Node, React. Powered by TypeScript

GraphQL first full-stack starter kit with Node, React. Powered by TypeScript

Karan Pratap Singh 1.1k Oct 14, 2021
React version of Argon Dashboard

Argon Dashboard React Start your development with a Dashboard for Bootstrap 4, React and Reactstrap, made with create-react-app. It is open source, fr

Creative Tim 325 Oct 9, 2021
An easy and straight forward full-stack web application boilerplate using Node.js Express as backend and React as frontend.

An easy and straight forward full-stack web application boilerplate using Node.js Express as backend and React as frontend. All packages are structured as Yarn Workspaces and written in Typescript. In addition, the web application can be built as Docker image using a multi stage built supported Dockerfile.

null 12 Oct 8, 2021
StarHackIt: React/Native/Node fullstack starter kit with authentication and authorisation, data backed by SQL.

StarHackIt StarHackIt is a fullstack starter kit composed of: React web frontend Node backend React native mobile app Infrastructure as code with GruC

FredericH 1.3k Oct 9, 2021
Fullstack Boilerplate GraphQL. Made with React & Prisma + authentication & roles

Node Apollo Prisma Express React GraphQL Boilerplate for a Fullstack GraphQL App with React & Prisma ?? Bootstrap your fullstack GraphQL app within se

Alan 699 Oct 18, 2021
Customizable Electron Titlebar for frameless windows

frameless-titlebar Customizable titlebar for frameless electron windows built with React Demo App The demo application can be found in the example fol

Cristian Ponce 193 Oct 13, 2021
GlueStick is a command line interface for quickly developing universal web applications using React and Redux.

Deprecation Notice GlueStick is now archived. It was one of the first React-in-a-box projects and helped TrueCar quickly migrate to React. With the Re

TrueCar Inc 361 Sep 8, 2021
Now UI Kit React - Free Bootstrap 4, React, React Hooks and Reactstrap UI Kit

Now UI Kit React is a free Bootstrap 4, React, React Hooks and Reactstrap UI Kit provided for free by Invision and Creative Tim. It is a beautiful cross-platform UI kit featuring over 50 elements and 3 templates.

Creative Tim 109 Sep 30, 2021