Solution to the problem of version number mismatch in running electron and robot JS
Running found that the error version number does not match, to reduce the node version number, the result found that it is not the version number problem
<project>/node_modules/robotjs/build/Release/robotjs.node' was compiled against a different Node.js version using
NODE_MODULE_VERSION 57.
This version of Node.js requires NODE_MODULE_VERSION 54.
Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install).
After one operation, the node gyp construction error was reported again
node-expat.3.18 install /usr/local/lib/nodejs/node-v14.0.0-linux-x64/lib/node_modules/rnv/node_modules/node-expat node-gyp rebuild
gyp ERR! clean error gyp ERR! stack Error: EACCES: permission denied, rmdir 'build' gyp ERR! System Linux 5.3.0-51-generic gyp ERR! command "/usr/local/lib/nodejs/node-v14.0.0-linux-x64/bin/node" "/usr/local/lib/nodejs/node-v14.0.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/nodejs/node-v14.0.0-linux-x64/lib/node_modules/rnv/node_modules/node-expat gyp ERR! node -v v14.0.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.2.7 (node_modules/rnv/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN rnv.29.0 requires a peer of now.3.0 but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-expat.3.18 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-expat.3.18 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /home/abhishek/.npm/_logs/2020-05-10T08_21_14_099Z-debug.log
Solution: to delete the project again and execute the following command again can solve most of the problems
target is the electron version number
By printing console.info ( process.versions );
view the corresponding relationship between
node and ABI: see
cnpm rebuild --runtime=electron --target=8.5.5 --disturl=https://atom.io/download/atom-shell --abi=72
Read More:
- Some mistakes in using NPM
- mac Error: EACCES: permission denied, mkdir ‘./cache’
- Installing and uninstalling nodejs in Linux
- Using NPM to install Remix error in Windows 10
- Error gyp verb ‘which’ failed error: not found: python2 using Vue admin template master
- NPM install error | gyp err! Configure error
- How to solve the problem of Cannot find module’npmlog’ when installing nodejs under Linux
- Error: Module did not self-register
- When NPM install, make: G + +: command not found will be prompted
- Delete and unload node on MAC
- Local workspace file (‘angular.json’) could not be found.
- npm install Error: gyp verb `which` failed Error: not found: python
- Install and uninstall under Linux system Node.js
- gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildPr
- Node configuration environment variable and global installation of webapck
- Completely uninstall node and NPM on MAC
- NPM warn optional skipping optional dependency: 1 [email protected] (node_ modules\fsevents):
- Module build failed: error: cannot find module ‘node sass’ error
- NPM compilation failed: can’t resolve ‘child_ process’
- NPM- Cannot find module ‘xxxxx’