Open jonnyfr opened 2 years ago
Hi, I'm guessing that your electron installation might be too new, newer electron versions ban node.js by default. to un-ban, add
nodeIntegration: true,
contextIsolation: false,
to https://github.com/LingDong-/PoseOSC/blob/master/main.js#L21
more info:
https://stackoverflow.com/questions/44391448/electron-require-is-not-defined
I also get a white Electron window...(I added that contextIsolation:false just in case)
when typing npm audit fix I get this error, so I guess it might be something related to my M1 mpb?
jcm@jcn PoseOSC-master % npm audit fix
npm WARN deprecated electron-notarize@0.2.1: Please use @electron/notarize moving forward. There is no API change, just a package name change
npm WARN deprecated node-pre-gyp@0.14.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm ERR! code 1
npm ERR! path /Users/jcm/Downloads/PoseOSC-master/node_modules/@tensorflow/tfjs-node
npm ERR! command failed
npm ERR! command sh -c node scripts/install.js
npm ERR! CPU-darwin-1.7.4.tar.gz
npm ERR! * Downloading libtensorflow
npm ERR! /Users/jcm/Downloads/PoseOSC-master/node_modules/@tensorflow/tfjs-node/scripts/install.js:95
npm ERR! throw new Error(Unsupported system: ${libType}-${platform}-${os.arch()}
);
npm ERR! ^
npm ERR!
npm ERR! Error: Unsupported system: cpu-darwin-arm64
npm ERR! at getPlatformLibtensorflowUri (/Users/jcm/Downloads/PoseOSC-master/node_modules/@tensorflow/tfjs-node/scripts/install.js:95:11)
npm ERR! at downloadLibtensorflow (/Users/jcm/Downloads/PoseOSC-master/node_modules/@tensorflow/tfjs-node/scripts/install.js:129:7)
npm ERR! at async run (/Users/jcm/Downloads/PoseOSC-master/node_modules/@tensorflow/tfjs-node/scripts/install.js:190:5)
npm ERR!
npm ERR! Node.js v19.7.0
npm ERR! A complete log of this run can be found in: npm ERR! /Users/jcm/.npm/_logs/2023-03-02T21_05_03_881Z-debug-0.log
Hi LingDong I was looking forward to trying your project. I have tried installing the binary as well as installing via npm on my M1 Mac, but both just opens a white program window without anything inside it. Any suggestions? I thought it might have something to do with webcam security? When I look for available webcams in the console (⌘⌥I in app). I get the attached image.
Thanks!