octalmage / robotjs

Node.js Desktop Automation.
http://robotjs.io
MIT License
12.37k stars 961 forks source link

can't start electron (symbol lookup error) #521

Open ssilb4 opened 4 years ago

ssilb4 commented 4 years ago
  1. npm run dev
  2. electron .

error occured like below.

/home/(user)/n/lib/node_modules/electron/dist/electron .: symbol lookup error: /home/(user)/Documents/workspace/shadow-electron-starter/robotjs3/build/Release/robotjs.node: undefined symbol: _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeE

package.json:

"devDependencies": { "robotjs": "file:robotjs3", "shadow-cljs": "^2.8.69" }, "dependencies": { "create-react-class": "^15.6.3", "electron-prebuilt": "^1.4.13", "nan": "^2.14.0", "react": "^16.10.2", "react-dom": "^16.10.2", "scheduler": "^0.17.0" }

my Environment

dsteinman commented 4 years ago

I got Electron working using the "fix/node13" branch of robotJS, Electron 7.1.2, which uses Node 12.8.2.

I had to rebuild robotjs with the following command to get it to bind against the right version of node:

npm rebuild --runtime=electron --target=7.1.2 --disturl=https://atom.io/download/atom-shell --abi=75
oktapodia commented 4 years ago

A new version of robotjs supporting the latest NodeJS version will be published soon.