trtc-electron-sdk compatible with Electron v12.0.1?trtc-electron-sdk does not rely on the SDK of Electron and therefore does not have version requirements.
$ npm config set electron_custom_dir 8.1.1 # Determined by the actual version number

trtc-electron-sdk (xxx/node_modules/trtc-electron-sdk) in your project and run the following command:npm run install -- arch=ia32
trtc_electron_sdk.node and build your project again.cd ~/Library/Application\\ Support/com.apple.TCC/cp TCC.db TCC.db.baksqlite3 TCC.db # sqlite> prompt appears.# for Mojave, CatalinaINSERT into access VALUES('kTCCServiceCamera',"com.microsoft.VSCode",0,1,1,NULL,NULL,NULL,'UNUSED',NULL,0,1541440109);# for BigSurINSERT into access VALUES('kTCCServiceCamera',"com.microsoft.VSCode",0,1,1,1,NULL,NULL,NULL,'UNUSED',NULL,0,1541440109);

contextIsolation to false.let win = new BrowserWindow({width: 1366,height: 1024,minWidth: 800,minHeight: 600,webPreferences: {nodeIntegration: true,contextIsolation: false},});
Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
npm config get cache to view the cache path.npm install again.csrutil disable.csrutil enable in step 2.xx is the node module):Uncaught ReferenceError: require is not defined
nodeIntegration to true in the main.js file of Electron:let win = new BrowserWindow({width: 1366,height: 1024,webPreferences: {nodeIntegration: true, // Set it to `true`},});
NodeRTCCloud is not a constructor
Cannot open xxx/trtc_electron_sdk.node or The specified module could not be found
dlopen(xxx/trtc_electron_sdk.node, 1): image not found
trtc_electron_sdk.node module hasn’t been built into your project successfully. To fix the problem, follow these steps:native-ext-loader.$ npm i native-ext-loader -D
module.exports to pass the --target_platform command line parameter to webpack.config.js so that your project can be packaged correctly for its target platform.const os = require('os');// If you don’t pass `target_platform`, your project will be packaged for the current platform.const targetPlatform = (function(){let target = os.platform();for (let i=0; i<process.argv.length; i++) {if (process.argv[i].includes('--target_platform=')) {target = process.argv[i].replace('--target_platform=', '');break;}}// `win32` indicates Windows, including 32-bit and 64-bit. `darwin` indicates macOS.if (!['win32', 'darwin'].includes) target = os.platform();return target;})();
module: {rules: [{test: /\\.node$/,loader: 'native-ext-loader',options: {rewritePath: targetPlatform === 'win32' ? './resources' : '../Resources'}},]}
vue-cli, webpack configuration can be found in the configureWebpack option of vue.config.js.create-react-app, the path to the webpack configuration file is [Project directory]/node_modules/react-scripts/config/webpack.config.js.packages.json.electron-builder (case sensitive):"build": {"Omit": "...","win": {"extraFiles": [{"from": "node_modules/trtc-electron-sdk/build/Release/","to": "./resources","filter": ["**/*"]}]},"mac": {"extraFiles": [{"from": "node_modules/trtc-electron-sdk/build/Release/trtc_electron_sdk.node","to": "./Resources"}]},"directories": {"output": "./bin"}},
create-react-app, add building and packaging scripts as follows:"scripts": {"build:mac": "react-scripts build --target_platform=darwin","build:win": "react-scripts build --target_platform=win32","compile:mac": "node_modules/.bin/electron-builder --mac","compile:win64": "node_modules/.bin/electron-builder --win --x64","pack:mac": "npm run build:mac && npm run compile:mac","pack:win64": "npm run build:win && npm run compile:win64"}
vue-cli, add building and packaging scripts as follows:"scripts": {"build:mac": "vue-cli-service build --target_platform=darwin","build:win": "vue-cli-service build --target_platform=win32","compile:mac": "node_modules/.bin/electron-builder --mac","compile:win64": "node_modules/.bin/electron-builder --win --x64","pack:mac": "npm run build:mac && npm run compile:mac","pack:win64": "npm run build:win && npm run compile:win64"}
electron-builder to build a project created with create-react-app, the following error may occur:$ node_modules\\.bin\\electron-builder.cmd• electron-builder version=22.6.0 os=6.1.7601• loaded configuration file=package.json ("build" field)• public/electron.js not found. Please see https://medium.com/@kitze/%EF%B8%8F-from-react-to-an-electron-app-ready-for-production-a0468ecb1da3• loaded parent configuration preset=react-cra
public/electron.js not found indicates that the entry point file was not found.$ cd [Project directory]$ mv main.electron.js ./public/electron.js
pacakge.json file:{"main": "public/electron.js","Omit": "..."}
fs-extra module occurs during packaging?[Project directory]\\node_modules\\electron-builder\\node_modules\\fs-extra\\lib\\empty\\index.js:33} catch {^SyntaxError: Unexpected token {at new Script (vm.js:51:7)
Feedback