Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module './build/release/robotjs.node' election #72

Open
diserdong opened this issue Dec 3, 2021 · 2 comments
Open

Cannot find module './build/release/robotjs.node' election #72

diserdong opened this issue Dec 3, 2021 · 2 comments

Comments

@diserdong
Copy link

Error: Cannot find module './build/Release/robotjs.node' at webpackMissingModule (/Users/diserdong/Work/workSpace/deskWork/rhino-air/.webpack/main/index.js:21139:84) at Object../node_modules/_robotjs@0.6.0@robotjs/index.js (/Users/diserdong/Work/workSpace/deskWork/rhino-air/.webpack/main/index.js:21139:187) at __webpack_require__ (/Users/diserdong/Work/workSpace/deskWork/rhino-air/.webpack/main/index.js:27521:42) at /Users/diserdong/Work/workSpace/deskWork/rhino-air/.webpack/main/index.js:27600:65 at /Users/diserdong/Work/workSpace/deskWork/rhino-air/.webpack/main/index.js:27772:3 at Object.<anonymous> (/Users/diserdong/Work/workSpace/deskWork/rhino-air/.webpack/main/index.js:27775:12) at Module._compile (internal/modules/cjs/loader.js:1152:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:10) at Module.load (internal/modules/cjs/loader.js:992:32) at Module._load (internal/modules/cjs/loader.js:885:14)

./electron/main.js
import robot from "robotjs"

And I tried the suggested npm install and npm rebuild within the node_modules/robotjs directory, but the error wasn't fixed.

https://github.com/octalmage/robotjs/wiki/Electron

npm rebuild --runtime=electron --target=13.1.2 --disturl=https://atom.io/download/atom-shell --abi=83

node: 14.16.0
electron-rebuild: 3.2.4
electron: 13.1.2 (process.version)

@diserdong diserdong changed the title cannot find module './build/release/robotjs.node' election Cannot find module './build/release/robotjs.node' election Dec 3, 2021
@nanchengjiumeng
Copy link

so how to resolve this question?

@nanchengjiumeng
Copy link

try this:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants