Unsolved [GATEWAY] node-pty Loading error!
-
Hello @bugsounet,
I am still struggeling with getting the Gateway module to work, as described in:
https://forum.bugsounet.fr/topic/1461/error-gateway-lib-node-pty-loading-errorThe error I am seeing looks something like this:
Error: The module '/home/pi/MagicMirror/modules/Gateway/node_modules/node-pty/build/Release/pty.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 110. This version of Node.js requires NODE_MODULE_VERSION 116.
running npm run rebuild did not work unfortunately
Do you have any ideas what I could try to make it work again?
Any help is highly appreciated
Many thanks
-
can you try this: (in terminal)
# enter to Gateway directory cd ~/MagicMirror/modules/Gateway # erase installed version npm run clean # reset to last know local Gateway version npm run reset # update Gateway npm run update
past installer log content
-
Hey @bugsounet,
thank you for your help. I just tried the steps you mentioned.
Not sure if you need the complete output, but here we go:
i@MagicMirror:~/MagicMirror/modules/Gateway $ npm run update > Gateway@3.6.2 update > installer/update.sh Welcome to Gateway v3.6.2 Updater Updating... HEAD is now at 9e55834 v3.6.2 hint: Pulling without specifying how to reconcile divergent branches is hint: discouraged. You can squelch this message by running one of the following hint: commands sometime before your next pull: hint: hint: git config pull.rebase false # merge (the default strategy) hint: git config pull.rebase true # rebase hint: git config pull.ff only # fast-forward only hint: hint: You can replace "git config" with "git config --global" to set a default hint: preference for all repositories. You can also pass --rebase, --no-rebase, hint: or --ff-only on the command line to override the configured default per hint: invocation. From https://github.com/bugsounet/Gateway ea866f5..ad4b49e admin -> origin/admin Already up to date. Done Ready for Installing... > Gateway@3.6.2 preinstall > installer/preinstall.sh -d 'nginx certbot python3 python-is-python3 python3-certbot-nginx make build-essential' Welcome to Gateway v3.6.2 No root checking... Checking Gateway: pi/pi Checking MagicMirror: pi/pi Checking OS... OS Detected: linux-gnueabihf (raspbian 11 aarch64) Checking all dependencies... All Dependencies needed are installed ! > Gateway@3.6.2 postinstall > installer/postinstall.sh -r -m -b Minify Main code... Found: 23 files to minify Process File: ../Gateway.js Process File: ../node_helper.js Process File: ../components/translations.js Process File: ../components/systemd.js Process File: ../components/systemInformation.js Process File: ../components/speedtest.js Process File: ../components/speedtest-net.js Process File: ../components/parseData.js Process File: ../components/loadLibraries.js Process File: ../components/hyperwatch.js Process File: ../components/homegraph.js Process File: ../components/callbacks.js Process File: ../components/actionsOnGoogle.js Process File: ../components/SmartHomeMiddleware.js Process File: ../components/SHTools.js Process File: ../components/SHCallbacks.js Process File: ../components/OthersRules.js Process File: ../components/GatewayMiddleware.js Process File: ../components/GWTools.js Process File: ../components/GWDatabase.js Process File: ../components/DeviceManagement.js Process File: ../components/AssistantActions.js Process File: ../components/ActionsOnEXT.js Done Rebuild MagicMirror... make: Entering directory '/home/pi/MagicMirror/modules/Gateway/node_modules/lzma-native/build' CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o rm -f Release/obj.target/../node-addon-api/nothing.a Release/obj.target/../node-addon-api/nothing.a.ar-file-list; mkdir -p `dirname Release/obj.target/../node-addon-api/nothing.a` ar crs Release/obj.target/../node-addon-api/nothing.a @Release/obj.target/../node-addon-api/nothing.a.ar-file-list COPY Release/nothing.a ACTION binding_gyp_liblzma_target_build . . . . /usr/bin/install -c -m 644 xz-5.2.3/doc/examples/00_README.txt xz-5.2.3/doc/examples/01_compress_easy.c xz-5.2.3/doc/examples/02_decompress.c xz-5.2.3/doc/examples/03_compress_custom.c xz-5.2.3/doc/examples/04_compress_easy_mt.c xz-5.2.3/doc/examples/Makefile '/home/pi/MagicMirror/modules/Gateway/node_modules/lzma-native/build/liblzma/build/share/doc/xz/examples' /usr/bin/mkdir -p '/home/pi/MagicMirror/modules/Gateway/node_modules/lzma-native/build/liblzma/build/share/doc/xz/examples_old' /usr/bin/install -c -m 644 xz-5.2.3/doc/examples_old/xz_pipe_comp.c xz-5.2.3/doc/examples_old/xz_pipe_decomp.c '/home/pi/MagicMirror/modules/Gateway/node_modules/lzma-native/build/liblzma/build/share/doc/xz/examples_old' make[3]: Leaving directory '/home/pi/MagicMirror/modules/Gateway/node_modules/lzma-native/build/liblzma' make[2]: Leaving directory '/home/pi/MagicMirror/modules/Gateway/node_modules/lzma-native/build/liblzma' make[1]: Leaving directory '/home/pi/MagicMirror/modules/Gateway/node_modules/lzma-native/build/liblzma' TOUCH Release/obj.target/liblzma.stamp CXX(target) Release/obj.target/lzma_native/src/util.o CXX(target) Release/obj.target/lzma_native/src/liblzma-functions.o CXX(target) Release/obj.target/lzma_native/src/filter-array.o CXX(target) Release/obj.target/lzma_native/src/lzma-stream.o CXX(target) Release/obj.target/lzma_native/src/module.o CXX(target) Release/obj.target/lzma_native/src/mt-options.o CXX(target) Release/obj.target/lzma_native/src/index-parser.o SOLINK_MODULE(target) Release/obj.target/lzma_native.node COPY Release/lzma_native.node make: Leaving directory '/home/pi/MagicMirror/modules/Gateway/node_modules/lzma-native/build' make: Entering directory '/home/pi/MagicMirror/modules/Gateway/node_modules/node-pty/build' CXX(target) Release/obj.target/pty/src/unix/pty.o SOLINK_MODULE(target) Release/obj.target/pty.node COPY Release/pty.node make: Leaving directory '/home/pi/MagicMirror/modules/Gateway/node_modules/node-pty/build' Done Support is now moved in a dedicated Server: https://forum.bugsounet.fr @bugsounet Gateway is now installed ! added 369 packages in 4m 60 packages are looking for funding run `npm fund` for details
-
ok for me it’s correct
And by launching MM², it’s works or same error ? -
Unfortunately I still get:
[12.10.2023 20:16.46.336] [ERROR] [GATEWAY] [LIB] node-pty Loading error! Error: The module '/home/pi/MagicMirror/modules/Gateway/node_modules/node-pty/build/Release/pty.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 110. This version of Node.js requires NODE_MODULE_VERSION 116. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`). at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:2131) at Object.<anonymous> (node:internal/modules/cjs/loader:1356:18) at Object.func [as .node] (node:electron/js2c/asar_bundle:2:2131) at Module.load (node:internal/modules/cjs/loader:1126:32) at node:internal/modules/cjs/loader:967:12 at Function._load (node:electron/js2c/asar_bundle:2:13327) at Module.require (node:internal/modules/cjs/loader:1150:19) at require (node:internal/modules/cjs/helpers:110:18) at Object.<anonymous> (/home/pi/MagicMirror/modules/Gateway/node_modules/node-pty/lib/unixTerminal.js:29:11) at Module._compile (node:internal/modules/cjs/loader:1271:14) at Object..js (node:internal/modules/cjs/loader:1326:10) at Module.load (node:internal/modules/cjs/loader:1126:32) at node:internal/modules/cjs/loader:967:12 at Function._load (node:electron/js2c/asar_bundle:2:13327) at Module.require (node:internal/modules/cjs/loader:1150:19) at require (node:internal/modules/cjs/helpers:110:18) { code: 'ERR_DLOPEN_FAILED' } [12.10.2023 20:16.46.339] [LOG] [GATEWAY] [LIB] Loaded: express -> this.lib.express [12.10.2023 20:16.46.340] [LOG] [GATEWAY] [LIB] Loaded: http -> this.lib.http [12.10.2023 20:16.46.567] [LOG] [GATEWAY] [LIB] Loaded: semver -> this.lib.semver [12.10.2023 20:16.46.570] [LOG] [GATEWAY] [LIB] Loaded: body-parser -> this.lib.bodyParser [12.10.2023 20:16.46.688] [LOG] [GATEWAY] [LIB] Loaded: express-session -> this.lib.session [12.10.2023 20:16.46.729] [LOG] [GATEWAY] [LIB] Loaded: passport -> this.lib.passport [12.10.2023 20:16.46.739] [LOG] [GATEWAY] [LIB] Loaded: passport-local -> this.lib.LocalStrategy [12.10.2023 20:16.47.251] [LOG] [GATEWAY] [LIB] Loaded: socket.io -> this.lib.Socket [12.10.2023 20:16.47.253] [LOG] [GATEWAY] [LIB] Loaded: cors -> this.lib.cors [12.10.2023 20:16.47.254] [LOG] [GATEWAY] [LIB] Loaded: path -> this.lib.path [12.10.2023 20:16.47.255] [LOG] [GATEWAY] [LIB] Loaded: child_process -> this.lib.childProcess [12.10.2023 20:16.47.256] [LOG] [GATEWAY] [LIB] Loaded: fs -> this.lib.fs [12.10.2023 20:16.47.257] [LOG] [GATEWAY] [LIB] Loaded: util -> this.lib.util [12.10.2023 20:16.47.494] [LOG] [GATEWAY] [LIB] Loaded: systeminformation -> this.lib.si [12.10.2023 20:16.47.504] [LOG] [GATEWAY] [LIB] Loaded: command-exists -> this.lib.commandExists [12.10.2023 20:16.47.507] [LOG] [GATEWAY] [LIB] Loaded: readline -> this.lib.readline [12.10.2023 20:16.47.508] [LOG] [GATEWAY] [LIB] Loaded: stream -> this.lib.Stream [12.10.2023 20:16.53.712] [LOG] [GATEWAY] [LIB] Loaded: actions-on-google -> this.lib.actions [12.10.2023 20:16.53.714] [LOG] [GATEWAY] [LIB] Loaded: googleapis -> this.lib.googleapis [12.10.2023 20:16.53.714] [LOG] [GATEWAY] [LIB] Loaded: google-auth-library -> this.lib.GoogleAuthLibrary [12.10.2023 20:16.53.788] [LOG] [GATEWAY] [LIB] Loaded: lodash -> this.lib._ [12.10.2023 20:16.53.790] [LOG] [GATEWAY] [LIB] Loaded: moment -> this.lib.moment [12.10.2023 20:16.53.810] [LOG] [GATEWAY] [LIB] Loaded: mkdirp -> this.lib.mkdirp [12.10.2023 20:16.53.810] [LOG] [GATEWAY] [LIB] Loaded: https -> this.lib.https [12.10.2023 20:16.54.064] [LOG] [GATEWAY] [LIB] Loaded: decompress -> this.lib.decompress [12.10.2023 20:16.54.066] [LOG] [GATEWAY] [LIB] Loaded: decompress-tar -> this.lib.decompressTar [12.10.2023 20:16.54.067] [LOG] [GATEWAY] [LIB] Loaded: decompress-tarbz2 -> this.lib.decompressTarbz2 [12.10.2023 20:16.54.068] [LOG] [GATEWAY] [LIB] Loaded: decompress-targz -> this.lib.decompressTargz [12.10.2023 20:16.54.069] [LOG] [GATEWAY] [LIB] Loaded: decompress-unzip -> this.lib.decompressUnzip [12.10.2023 20:16.54.220] [LOG] [GATEWAY] [LIB] Loaded: @felipecrs/decompress-tarxz -> this.lib.decompressTarXz [12.10.2023 20:16.54.236] [LOG] [GATEWAY] [LIB] Loaded: tree-kill -> this.lib.kill [12.10.2023 20:16.54.241] [LOG] [GATEWAY] [LIB] Loaded: sha256-file -> this.lib.sha256_file [12.10.2023 20:16.54.242] [LOG] [GATEWAY] Detected: MMM-GoogleAssistant [12.10.2023 20:16.54.252] [ERROR] [GATEWAY] Warning: 1 needed library not loaded ! [12.10.2023 20:16.54.253] [ERROR] [GATEWAY] Try to solve it with `npm run rebuild` in Gateway directory
-
ok, can you try to reinstall MagicMirror ?
cd ~/MagicMirror rm -rf node_modules git reset --hard git pull npm install
-
Tried it, but still getting this:
[12.10.2023 20:48.26.393] [ERROR] innerError Error: Cannot find module '../build/Debug/pty.node' Require stack: - /home/pi/MagicMirror/modules/Gateway/node_modules/node-pty/lib/unixTerminal.js - /home/pi/MagicMirror/modules/Gateway/node_modules/node-pty/lib/index.js - /home/pi/MagicMirror/modules/Gateway/components/loadLibraries.js - /home/pi/MagicMirror/modules/Gateway/components/parseData.js - /home/pi/MagicMirror/modules/Gateway/node_helper.js - /home/pi/MagicMirror/js/app.js - /home/pi/MagicMirror/js/electron.js - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js - at node:internal/modules/cjs/loader:1084:15 at Function.<anonymous> (node:electron/js2c/browser_init:2:117419) at Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29) at node:internal/modules/cjs/loader:929:27 at Function._load (node:electron/js2c/asar_bundle:2:13327) at Module.require (node:internal/modules/cjs/loader:1150:19) at require (node:internal/modules/cjs/helpers:110:18) at Object.<anonymous> (/home/pi/MagicMirror/modules/Gateway/node_modules/node-pty/lib/unixTerminal.js:34:15) at Module._compile (node:internal/modules/cjs/loader:1271:14) at Object..js (node:internal/modules/cjs/loader:1326:10) at Module.load (node:internal/modules/cjs/loader:1126:32) at node:internal/modules/cjs/loader:967:12 at Function._load (node:electron/js2c/asar_bundle:2:13327) at Module.require (node:internal/modules/cjs/loader:1150:19) at require (node:internal/modules/cjs/helpers:110:18) at Object.<anonymous> (/home/pi/MagicMirror/modules/Gateway/node_modules/node-pty/lib/index.js:14:20) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/pi/MagicMirror/modules/Gateway/node_modules/node-pty/lib/unixTerminal.js', '/home/pi/MagicMirror/modules/Gateway/node_modules/node-pty/lib/index.js', '/home/pi/MagicMirror/modules/Gateway/components/loadLibraries.js', '/home/pi/MagicMirror/modules/Gateway/components/parseData.js', '/home/pi/MagicMirror/modules/Gateway/node_helper.js', '/home/pi/MagicMirror/js/app.js', '/home/pi/MagicMirror/js/electron.js', '/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js', undefined ] } [12.10.2023 20:48.26.401] [ERROR] [GATEWAY] [LIB] node-pty Loading error! Error: The module '/home/pi/MagicMirror/modules/Gateway/node_modules/node-pty/build/Release/pty.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 110. This version of Node.js requires NODE_MODULE_VERSION 116. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`). at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:2131) at Object.<anonymous> (node:internal/modules/cjs/loader:1356:18) at Object.func [as .node] (node:electron/js2c/asar_bundle:2:2131) at Module.load (node:internal/modules/cjs/loader:1126:32) at node:internal/modules/cjs/loader:967:12 at Function._load (node:electron/js2c/asar_bundle:2:13327) at Module.require (node:internal/modules/cjs/loader:1150:19) at require (node:internal/modules/cjs/helpers:110:18) at Object.<anonymous> (/home/pi/MagicMirror/modules/Gateway/node_modules/node-pty/lib/unixTerminal.js:29:11) at Module._compile (node:internal/modules/cjs/loader:1271:14) at Object..js (node:internal/modules/cjs/loader:1326:10) at Module.load (node:internal/modules/cjs/loader:1126:32) at node:internal/modules/cjs/loader:967:12 at Function._load (node:electron/js2c/asar_bundle:2:13327) at Module.require (node:internal/modules/cjs/loader:1150:19) at require (node:internal/modules/cjs/helpers:110:18) { code: 'ERR_DLOPEN_FAILED' }
-
@bugsounet said in [GATEWAY] node-pty Loading error!:
can you try this: (in terminal)
# enter to Gateway directory cd ~/MagicMirror/modules/Gateway # erase installed version npm run clean # reset to last know local Gateway version npm run reset # update Gateway npm run update
past installer log content
because we have reinstalled MagicMirror², can you retry this again ?
and naturally restart MM²If not works you can also try this:
cd ~/MagicMirror/modules/MMM-GoogleAssistant npm run update npm run refresh
-
I just tried just all of that, unfortunately I still get the “was compiled against a different Node.js version” error – just really really strange ¯_(ツ)_/¯
-
yes I don’t understand why it’s locked for electron v22.x because we are in electron v26.x