zeromq / zeromq.js

:zap: Node.js bindings to the ØMQ library
http://zeromq.github.io/zeromq.js/
MIT License
1.42k stars 203 forks source link

electron+node+react "require is not defined'. #598

Closed FrenchFries53 closed 5 months ago

FrenchFries53 commented 5 months ago

Describe the bug require is not defined Call Stack  eval   node_modules/@aminya/node-gyp-build/index.js:7:23  ../../node_modules/@aminya/node-gyp-build/index.js   main.js:18:1  options.factory   main.js:30429:31  webpack_require   main.js:29810:33  fn   main.js:30086:21  eval   node_modules/zeromq/lib/native.js:7:18  ../../node_modules/zeromq/lib/native.js   main.js:21007:1  options.factory   main.js:30429:31  webpack_require   main.js:29810:33  fn   main.js:30086:21

use version: electron:25.3.1 @types/node: 18.13.0 @types/react: 17.0.53 zeromq:5.3.1 or lastet Has anyone encountered an error message that has been continuously reported since its introduction?

aminya commented 5 months ago

You are trying to bundle this backend code in your front-end that doesn't support require.

ykchong45 commented 3 weeks ago

I haven't tried this out, but looks like other people proposed using jszmq for frontend related project. #480