Open gijbelsy opened 2 years ago
It seems that there are breaking changes in node-js v17. Downgrading to v14 resolved the issue. But still, this needs to be adressed.
I have the same problem after upgrading to MM 2.18.0 Maybe it is the same problem as described here: https://forum.magicmirror.builders/topic/16074/electron-rebuild-and-magicmirror-v2-18-and-more I tried the steps but it didn't work.
Follow the instructions in the readme to clone the repository. Then edit package.json and under devDependencies
replace
"electron-rebuild": "^1.2.1"
with
"magicmirror-rebuild": "^1.0.0"
and under scripts
replace
"postinstall": "node_modules/.bin/electron-rebuild -e ../../node_modules/electron"
with
"postinstall": "node_modules/.bin/MagicMirror-rebuild -e ../../node_modules/electron"
Save your changes to package.json and run npm install
see pr #18
I still can't install even after making those changes. Any ideas?
npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'make-fetch-happen@11.1.1', npm WARN EBADENGINE required: { node: '^14.17.0 || ^16.13.0 || >=18.0.0' }, npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'cacache@17.1.3', npm WARN EBADENGINE required: { node: '^14.17.0 || ^16.13.0 || >=18.0.0' }, npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'minipass-fetch@3.0.3', npm WARN EBADENGINE required: { node: '^14.17.0 || ^16.13.0 || >=18.0.0' }, npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'ssri@10.0.4', npm WARN EBADENGINE required: { node: '^14.17.0 || ^16.13.0 || >=18.0.0' }, npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@npmcli/fs@3.1.0', npm WARN EBADENGINE required: { node: '^14.17.0 || ^16.13.0 || >=18.0.0' }, npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'fs-minipass@3.0.2', npm WARN EBADENGINE required: { node: '^14.17.0 || ^16.13.0 || >=18.0.0' }, npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'glob@10.3.3', npm WARN EBADENGINE required: { node: '>=16 || 14 >=14.17' }, npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'unique-filename@3.0.0', npm WARN EBADENGINE required: { node: '^14.17.0 || ^16.13.0 || >=18.0.0' }, npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'unique-slug@4.0.0', npm WARN EBADENGINE required: { node: '^14.17.0 || ^16.13.0 || >=18.0.0' }, npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'foreground-child@3.1.1', npm WARN EBADENGINE required: { node: '>=14' }, npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'jackspeak@2.2.1', npm WARN EBADENGINE required: { node: '>=14' }, npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'minimatch@9.0.3', npm WARN EBADENGINE required: { node: '>=16 || 14 >=14.17' }, npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'path-scurry@1.10.1', npm WARN EBADENGINE required: { node: '>=16 || 14 >=14.17' }, npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'signal-exit@4.0.2', npm WARN EBADENGINE required: { node: '>=14' }, npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'lru-cache@10.0.0', npm WARN EBADENGINE required: { node: '14 || >=16.14' }, npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'minipass@7.0.2', npm WARN EBADENGINE required: { node: '>=16 || 14 >=14.17' }, npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' } npm WARN EBADENGINE }
Magic-Mirror-Module-Buttons@1.0.0 postinstall node_modules/.bin/MagicMirror-rebuild -e ../../node_modules/electron
⠏ MagicMirror Building module: epoll, Completed: 0gyp info find Python using Python version 3.10.12 found at "/usr/bin/python3"
An unhandled error occurred inside electron-rebuild Unexpected token '.'
/home/nfogarty/MagicMirror/modules/MMM-Buttons/node_modules/ssri/lib/index.js:16
const getOptString = options => options?.length ? ?${options.join('?')}
: ''
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.
npm ERR! A complete log of this run can be found in: npm ERR! /home/nfogarty/.npm/_logs/2023-07-13T13_26_49_955Z-debug.log
yes, use my fork which fixes install problem
https://github.com/sdetweil/MMM-Buttons
use my url in the git clone
Thanks so much for replying, I did try your fork and I get a different error. Any ideas?
nfogarty@homepi:~/MagicMirror/modules $ sudo git clone https://github.com/sdetweil/MMM-Buttons
Cloning into 'MMM-Buttons'...
remote: Enumerating objects: 56, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 56 (delta 0), reused 2 (delta 0), pack-reused 52
Receiving objects: 100% (56/56), 11.86 KiB | 176.00 KiB/s, done.
Resolving deltas: 100% (25/25), done.
nfogarty@homepi:~/MagicMirror/modules $ cd MMM-Buttons/
nfogarty@homepi:~/MagicMirror/modules/MMM-Buttons $ ls
CHANGELOG.md node_helper.js postinstall
MMM-Buttons.js package.json README.md
nfogarty@homepi:~/MagicMirror/modules/MMM-Buttons $ sudo npm install
npm ERR! code 1
npm ERR! path /home/nfogarty/MagicMirror/modules/MMM-Buttons/node_modules/epoll
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@12.22.12 | linux | arm64
npm ERR! gyp info find Python using Python version 3.10.12 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/share/nodejs/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/nfogarty/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/share/nodejs/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/include/nodejs/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/usr/include/nodejs',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/share/nodejs/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/usr/include/nodejs/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/nfogarty/MagicMirror/modules/MMM-Buttons/node_modules/epoll',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Traceback (most recent call last):
npm ERR! File "/usr/share/nodejs/node-gyp/gyp/gyp_main.py", line 33, in gyp
failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/usr/share/nodejs/node-gyp/lib/configure.js:355:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:314:20)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
npm ERR! gyp ERR! System Linux 6.1.21-v8+
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/share/nodejs/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/nfogarty/MagicMirror/modules/MMM-Buttons/node_modules/epoll
npm ERR! gyp ERR! node -v v12.22.12
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2023-07-13T23_28_26_717Z-debug.log nfogarty@homepi:~/MagicMirror/modules/MMM-Buttons $
you are using node 12, MagicMirror requires node 16.13
and NEVER use sudo on any module
try that again
You’re right! Thank you so much it worked!
On 14 Jul 2023, at 9:23 am, sam detweiler @.***> wrote:
you are using node 12, MagicMirror requires node 16.13
and NEVER use sudo on any module
try that again
— Reply to this email directly, view it on GitHub https://github.com/Jopyth/MMM-Buttons/issues/16#issuecomment-1635084465, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI7VIV3CKVLGS5ASARIWDDXQCGPRANCNFSM5OXSWVKQ. You are receiving this because you commented.
yes, use my fork which fixes install problem
https://github.com/sdetweil/MMM-Buttons
use my url in the git clone
This needs more attention!!
Thank you so much. Losing my mind over here lol
@ktfcaptain sorry, don't understand. did it work?
@ktfcaptain sorry, don't understand. did it work?
Yes, for that particular issue. Still trying to get other stuff to work, but I just go this to load so feeling somewhat accomplished...
I'm receiving the following error when trying to install MMM-Buttons:
It seems that the
sh -c node_modules/.bin/electron-rebuild -e node_modules/electron
command causes problems. Any solution to this?