You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I add in zeromq as either a devDependency or a regular dependency,
and when I import any (working!) zeromq test code into index.ts (or renderer.ts), it begins to barf.
unpack test-ui.zip into the directory. It contains updates to activate preact, sass, zeromq, etc..
npm start (it should work)
paste any working zeromq test code into either src/index.ts or src/renderer.ts
npm start to see it fail like above
Here is a sample bit of (working) code you can paste into index.ts to see it fail
import * as zmq from "zeromq"
interface WatcherDesc {
topic:string;
sock:zmq.Subscriber;
};
class SocketMap extends Map<string,WatcherDesc> {};
class LogWatcher {
url:string;
sockets:SocketMap;
constructor(topic:string, url:string="tcp://localhost:35501") {
this.url = url;
this.sockets = new SocketMap();
const sock = new zmq.Subscriber();
sock.connect(url);
sock.subscribe(topic);
console.log(`connected to ${url} for ${topic}`);
this.sockets[topic] = { topic, sock };
// console.log(this.sockets);
console.log(`for topic ${topic}`, this.sockets[topic]);
};
};
const LM = new LogWatcher('foo');
Actual behavior
Error: Failed to load zeromq.js addon.node: TypeError: The "path" argument must be of type string. Received undefined
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at Object.join (node:path:1244:7)
at findAddon (/home/work/test-app/test-ui/.webpack/main/index.js:2192:70)
at ./node_modules/zeromq/lib/load-addon.js (/home/work/test-app/test-ui/.webpack/main/index.js:2221:15)
at __webpack_require__ (/home/work/test-app/test-ui/.webpack/main/index.js:2296:42)
at ./node_modules/zeromq/lib/native.js (/home/work/test-app/test-ui/.webpack/main/index.js:2241:38)
at __webpack_require__ (/home/work/test-app/test-ui/.webpack/main/index.js:2296:42)
at ./node_modules/zeromq/lib/index.js (/home/work/test-app/test-ui/.webpack/main/index.js:1560:16)
at __webpack_require__ (/home/work/test-app/test-ui/.webpack/main/index.js:2296:42)
at ./src/LogWatcher.ts (/home/work/test-app/test-ui/.webpack/main/index.js:1140:26)
at __webpack_require__ (/home/work/test-app/test-ui/.webpack/main/index.js:2296:42)
at findAddon (/home/work/test-app/test-ui/.webpack/main/index.js:2214:15)
at ./node_modules/zeromq/lib/load-addon.js (/home/work/test-app/test-ui/.webpack/main/index.js:2221:15)
at __webpack_require__ (/home/work/test-app/test-ui/.webpack/main/index.js:2296:42)
at ./node_modules/zeromq/lib/native.js (/home/work/test-app/test-ui/.webpack/main/index.js:2241:38)
at __webpack_require__ (/home/work/test-app/test-ui/.webpack/main/index.js:2296:42)
at ./node_modules/zeromq/lib/index.js (/home/work/test-app/test-ui/.webpack/main/index.js:1560:16)
at __webpack_require__ (/home/work/test-app/test-ui/.webpack/main/index.js:2296:42)
at ./src/LogWatcher.ts (/home/work/test-app/test-ui/.webpack/main/index.js:1140:26)
at __webpack_require__ (/home/work/test-app/test-ui/.webpack/main/index.js:2296:42)
Steps to reproduce
See above
Additional information
Help! Please!
The text was updated successfully, but these errors were encountered:
So it seems process polyfill has bitrotted and is not providing process.arch and process.platform, I don't quite yet understand what the proper fix for this should be.
Hey @devzzzero , I think this is unfortunately a webpack configuration issue and not a Forge issue. It looks like you resolved it here, I hope it's working for you now!: niksy/node-stdlib-browser#33
I'm going to close this issue, but please let me know if you do think this is a Forge issue and we can try to address it
Pre-flight checklist
Electron Forge version
7.5.0
Electron version
v33.0.2
Operating system
OpenSuse 15.5
Last known working Electron Forge version
unknown
Expected behavior
Hi Please look at zeromq/zeromq.js#676 and
webpack/webpack#18987
When I add in zeromq as either a devDependency or a regular dependency,
and when I import any (working!) zeromq test code into index.ts (or renderer.ts), it begins to barf.
Here are the steps to reproduce this issue:
test-ui.zip
npm init electron-app@latest test-ui -- --template=webpack-typescript
npm start
(it should work)npm start
to see it fail like aboveHere is a sample bit of (working) code you can paste into index.ts to see it fail
Actual behavior
Steps to reproduce
See above
Additional information
Help! Please!
The text was updated successfully, but these errors were encountered: