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

ERR!'s and WARN's when trying to ''npm install'' #22

Open
Clintvd opened this issue Oct 9, 2022 · 9 comments
Open

ERR!'s and WARN's when trying to ''npm install'' #22

Clintvd opened this issue Oct 9, 2022 · 9 comments

Comments

@Clintvd
Copy link

Clintvd commented Oct 9, 2022

I'm fairly new to linux and can't seem to get a hang of what is going wrong here.

pi@raspberrypi:/MagicMirror/MMM-Gestures $ cd
pi@raspberrypi:
$ sudo n 10.19.0
installing : node-v10.19.0
mkdir : /usr/local/n/versions/node/10.19.0
fetch : https://nodejs.org/dist/v10.19.0/node-v10.19.0-linux-armv7l.tar.xz
copying : node/10.19.0
installed : v10.19.0 (with npm 6.13.4)
pi@raspberrypi:~ $ cd MMM-Gestures && npm install
bash: cd: MMM-Gestures: No such file or directory
pi@raspberrypi:~ $ cd MMM-Gestures && npm install
bash: cd: MMM-Gestures: No such file or directory
pi@raspberrypi:~ $ cd MagicMirror
pi@raspberrypi:~/MagicMirror $ cd MMM-Gestures && npm install
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!

@serialport/bindings-cpp@10.7.0 install /home/pi/MagicMirror/MMM-Gestures/node_modules/@serialport/bindings-cpp
node-gyp-build

gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack TypeError: Object.fromEntries is not a function
gyp ERR! stack at Object. (/home/pi/MagicMirror/MMM-Gestures/node_modules/@npmcli/fs/lib/fs.js:6:23)
gyp ERR! stack at Module._compile (internal/modules/cjs/loader.js:778:30)
gyp ERR! stack at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
gyp ERR! stack at Module.load (internal/modules/cjs/loader.js:653:32)
gyp ERR! stack at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
gyp ERR! stack at Function.Module._load (internal/modules/cjs/loader.js:585:3)
gyp ERR! stack at Module.require (internal/modules/cjs/loader.js:692:17)
gyp ERR! stack at require (internal/modules/cjs/helpers.js:25:18)
gyp ERR! stack at Object. (/home/pi/MagicMirror/MMM-Gestures/node_modules/@npmcli/fs/lib/index.js:2:6)
gyp ERR! stack at Module._compile (internal/modules/cjs/loader.js:778:30)
gyp ERR! System Linux 4.19.97-v7l+
gyp ERR! command "/usr/local/bin/node" "/home/pi/MagicMirror/MMM-Gestures/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/MagicMirror/MMM-Gestures/node_modules/@serialport/bindings-cpp
gyp ERR! node -v v10.19.0
gyp ERR! node-gyp -v v9.0.0
gyp ERR! Node-gyp failed to build your package.
gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
npm WARN notsup Unsupported engine for serialport@10.4.0: wanted: {"node":">=12.0.0"} (current: {"node":"10.19.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: serialport@10.4.0
npm WARN notsup Unsupported engine for @serialport/parser-byte-length@10.3.0: wanted: {"node":">=12.0.0"} (current: {"node":"10.19.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/parser-byte-length@10.3.0
npm WARN notsup Unsupported engine for @serialport/parser-inter-byte-timeout@10.3.0: wanted: {"node":">=12.0.0"} (current: {"node":"10.19.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/parser-inter-byte-timeout@10.3.0
npm WARN notsup Unsupported engine for @serialport/binding-mock@10.2.2: wanted: {"node":">=12.0.0"} (current: {"node":"10.19.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/binding-mock@10.2.2
npm WARN notsup Unsupported engine for @serialport/parser-cctalk@10.3.0: wanted: {"node":">=12.0.0"} (current: {"node":"10.19.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/parser-cctalk@10.3.0
npm WARN notsup Unsupported engine for @serialport/parser-delimiter@10.3.0: wanted: {"node":">=12.0.0"} (current: {"node":"10.19.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/parser-delimiter@10.3.0
npm WARN notsup Unsupported engine for @serialport/parser-ready@10.3.0: wanted: {"node":">=12.0.0"} (current: {"node":"10.19.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/parser-ready@10.3.0
npm WARN notsup Unsupported engine for @serialport/parser-regex@10.3.0: wanted: {"node":">=12.0.0"} (current: {"node":"10.19.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/parser-regex@10.3.0
npm WARN notsup Unsupported engine for @serialport/parser-readline@10.3.0: wanted: {"node":">=12.0.0"} (current: {"node":"10.19.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/parser-readline@10.3.0
npm WARN notsup Unsupported engine for @serialport/bindings-cpp@10.7.0: wanted: {"node":">=12.17.0 <13.0 || >=14.0.0"} (current: {"node":"10.19.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/bindings-cpp@10.7.0
npm WARN notsup Unsupported engine for @serialport/parser-slip-encoder@10.3.0: wanted: {"node":">=12.0.0"} (current: {"node":"10.19.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/parser-slip-encoder@10.3.0
npm WARN notsup Unsupported engine for @serialport/parser-spacepacket@10.3.0: wanted: {"node":">=12.0.0"} (current: {"node":"10.19.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/parser-spacepacket@10.3.0
npm WARN notsup Unsupported engine for @serialport/stream@10.3.0: wanted: {"node":">=12.0.0"} (current: {"node":"10.19.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/stream@10.3.0
npm WARN notsup Unsupported engine for @serialport/bindings-interface@1.2.2: wanted: {"node":"^12.22 || ^14.13 || >=16"} (current: {"node":"10.19.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/bindings-interface@1.2.2
npm WARN notsup Unsupported engine for @serialport/bindings-interface@1.2.1: wanted: {"node":"^12.22 || ^14.13 || >=16"} (current: {"node":"10.19.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/bindings-interface@1.2.1
npm WARN notsup Unsupported engine for @serialport/bindings-interface@1.2.1: wanted: {"node":"^12.22 || ^14.13 || >=16"} (current: {"node":"10.19.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/bindings-interface@1.2.1

npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! @serialport/bindings-cpp@10.7.0 install: node-gyp-build
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the @serialport/bindings-cpp@10.7.0 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/pi/.npm/_logs/2022-10-09T10_12_17_392Z-debug.log

@thobach
Copy link
Owner

thobach commented Oct 9, 2022

I suggest to try it with the latest node version, e.g. as described as a prerequisite on https://docs.magicmirror.builders/getting-started/installation.html. You seem to use version 10, but the latest one with long term support is 16.

@Clintvd
Copy link
Author

Clintvd commented Oct 10, 2022

Did that, got another error now :D.

cd MMM-Gestures && npm install

Magic-Mirror-Module-Gestures@1.0.0 postinstall
node_modules/.bin/MagicMirror-rebuild

⠇ MagicMirror Building module: bindings-cpp, Completed: 0gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
⠏ MagicMirror Building module: bindings-cpp, Completed: 0gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/home/pi/MagicMirror/MMM-Gestures/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/pi/MagicMirror/MMM-Gestures/node_modules/@serialport/bindings-cpp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/pi/MagicMirror/MMM-Gestures/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/pi/MagicMirror/MMM-Gestures/node_modules/@serialport/bindings-cpp/6.1.7/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/pi/MagicMirror/MMM-Gestures/node_modules/@serialport/bindings-cpp/6.1.7',
gyp info spawn args '-Dnode_gyp_dir=/home/pi/MagicMirror/MMM-Gestures/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/pi/MagicMirror/MMM-Gestures/node_modules/@serialport/bindings-cpp/6.1.7/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/pi/MagicMirror/MMM-Gestures/node_modules/@serialport/bindings-cpp',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
⠙ MagicMirror Building module: bindings-cpp, Completed: 0gyp: name 'openssl_fips' is not defined while evaluating condition 'openssl_fips != ""' in binding.gyp while trying to load binding.gyp
✖ MagicMirror Rebuild Failed

An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild '/home/pi/MagicMirror/MMM-Gestures/node_modules/@serialport/bindings-cpp'.
Error: gyp failed with exit code: 1

Error: node-gyp failed to rebuild '/home/pi/MagicMirror/MMM-Gestures/node_modules/@serialport/bindings-cpp'.
Error: gyp failed with exit code: 1

at ModuleRebuilder.rebuildNodeGypModule (/home/pi/MagicMirror/MMM-Gestures/node_modules/magicmirror-rebuild/build/module-rebuilder.js:193:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Rebuilder.rebuildModuleAt (/home/pi/MagicMirror/MMM-Gestures/node_modules/magicmirror-rebuild/build/rebuild.js:180:9)
at async Rebuilder.rebuild (/home/pi/MagicMirror/MMM-Gestures/node_modules/magicmirror-rebuild/build/rebuild.js:143:17)
at async /home/pi/MagicMirror/MMM-Gestures/node_modules/magicmirror-rebuild/build/cli.js:141:9

npm ERR! code 255
npm ERR! path /home/pi/MagicMirror/MMM-Gestures
npm ERR! command failed
npm ERR! command sh /tmp/postinstall-c9ccffeb.sh

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2022-10-10T06_48_31_288Z-debug-0.log

@Clintvd
Copy link
Author

Clintvd commented Oct 10, 2022

Reinstalled the OS and now this is the issue.

lint@clint:~/Documents/MagicMirror/modules/MMM-Gestures $ npm install

Magic-Mirror-Module-Gestures@1.0.0 postinstall
node_modules/.bin/MagicMirror-rebuild

⠋ Searching dependency tree
An unhandled error occurred inside electron-rebuild
Could not detect abi for version 19.1.0 and runtime electron. Updating "node-abi" might help solve this issue if it is a new release of electron

Error: Could not detect abi for version 19.1.0 and runtime electron. Updating "node-abi" might help solve this issue if it is a new release of electron
at Object.getAbi (/home/clint/Documents/MagicMirror/modules/MMM-Gestures/node_modules/node-abi/index.js:39:9)
at new Rebuilder (/home/clint/Documents/MagicMirror/modules/MMM-Gestures/node_modules/magicmirror-rebuild/build/rebuild.js:100:48)
at rebuildWithOptions (/home/clint/Documents/MagicMirror/modules/MMM-Gestures/node_modules/magicmirror-rebuild/build/rebuild.js:249:23)
at doRebuild (/home/clint/Documents/MagicMirror/modules/MMM-Gestures/node_modules/magicmirror-rebuild/build/rebuild.js:272:16)
at /home/clint/Documents/MagicMirror/modules/MMM-Gestures/node_modules/magicmirror-rebuild/build/cli.js:115:45
npm ERR! code 255
npm ERR! path /home/clint/Documents/MagicMirror/modules/MMM-Gestures
npm ERR! command failed
npm ERR! command sh /tmp/postinstall-0b6e4c1a.sh

npm ERR! A complete log of this run can be found in:
npm ERR! /home/clint/.npm/_logs/2022-10-10T15_40_09_753Z-debug-0.log

@thobach
Copy link
Owner

thobach commented Oct 10, 2022

What node-abi version do you have installed? E.g. from /home/clint/Documents/MagicMirror/modules/MMM-Gestures run npm list --depth=1 | grep node-abi

It should be a version greater than 3.13.

@Clintvd
Copy link
Author

Clintvd commented Oct 11, 2022

Hi Thobach, I have node 3.8.0 running. How can I upgrade this? Thank you in advance

@thobach
Copy link
Owner

thobach commented Oct 12, 2022

Thanks, this helped me to trouble-shoot. I provided a new version. You can navigate to /home/clint/Documents/MagicMirror/modules/MMM-Gestures and run git checkout to get the latest version, and then npm install to re-install the latest version.
This should update the node-abi version and return afterwards on npm list --depth=1 | grep node-abi: | +-- node-abi@3.26.0

@Clintvd
Copy link
Author

Clintvd commented Oct 13, 2022

Hi Thobach,

That didn't workout for me unfortunately.

After running git checkout I get the following:
M package-lock.json
M package.json
Your branch is up to date with 'origin/master'.

When I run npm install after that it shows this:

Magic-Mirror-Module-Gestures@1.0.0 postinstall
node_modules/.bin/MagicMirror-rebuild

⠋ Searching dependency tree
An unhandled error occurred inside electron-rebuild
Could not detect abi for version 19.1.0 and runtime electron. Updating "node-abi" might help solve this issue if it is a new release of electron

Error: Could not detect abi for version 19.1.0 and runtime electron. Updating "node-abi" might help solve this issue if it is a new release of electron
at Object.getAbi (/home/clint/Documents/MagicMirror/modules/MMM-Gestures/node_modules/node-abi/index.js:39:9)
at new Rebuilder (/home/clint/Documents/MagicMirror/modules/MMM-Gestures/node_modules/magicmirror-rebuild/build/rebuild.js:100:48)
at rebuildWithOptions (/home/clint/Documents/MagicMirror/modules/MMM-Gestures/node_modules/magicmirror-rebuild/build/rebuild.js:249:23)
at doRebuild (/home/clint/Documents/MagicMirror/modules/MMM-Gestures/node_modules/magicmirror-rebuild/build/rebuild.js:272:16)
at /home/clint/Documents/MagicMirror/modules/MMM-Gestures/node_modules/magicmirror-rebuild/build/cli.js:115:45
npm ERR! code 255
npm ERR! path /home/clint/Documents/MagicMirror/modules/MMM-Gestures
npm ERR! command failed
npm ERR! command sh /tmp/postinstall-0170c044.sh

npm ERR! A complete log of this run can be found in:
npm ERR! /home/clint/.npm/_logs/2022-10-13T06_20_06_934Z-debug-0.log

When I check my node abi stays at 3.8.

Thanks for putting in the effort in trouble-shooting this.

@Clintvd
Copy link
Author

Clintvd commented Oct 14, 2022

@thobach Can I contact you on Discord or another platform? I have reinstalled MagicMirror but can't seem to get it working. Thanks in advance.

@thobach
Copy link
Owner

thobach commented Oct 29, 2022

@Clintvd Can you try to update node-abi manually from
/home/clint/Documents/MagicMirror/modules/MMM-Gestures and run npm update node-abi. What does npm list --depth=1 | grep node-abi return afterwards?

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