- edited description
node version, npm fails to install
Hallo,
im dev wird jetzt node 16 verlangt (Required: {"node":"^16.13.2","npm":"^8.1.2"}). Damit faild allerdings schon der build der dependencies:
# npm install
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated axios@0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated core-js@1.2.7: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /snap/node/5880/bin/node /snap/node/5880/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/root/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN old lockfile
npm ERR! npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm ERR! npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm ERR! npm WARN old lockfile
npm ERR! npm WARN old lockfile This is a one-time fix-up, please be patient...
npm ERR! npm WARN old lockfile
npm ERR! npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm ERR! npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm ERR! npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm ERR! npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /root/.npm/_cacache/tmp/git-clonenLL8Gm/node_modules/canvas
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! /root/.npm/_logs/2022-02-11T10_33_13_553Z-debug-0.log
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-02-11T10_33_02_002Z-debug-0.log
Getestet mit
# node -v
v16.14.0
# npm -v
8.3.1
Comments (30)
-
reporter -
Fehler nicht nachstellbar. Vielleicht node_modules löschen und neu installieren?
-
- changed status to open
-
reporter Das hatte ich leider schon versucht. In meinem build Verzeichnis gibt es keinen Ordner node_modules mehr.
npm install
wirft weiterhin den obigen Fehler.
Welche Versionen von node und npm builden denn erfolgreich?
-
16.14.0/8.3.1 funktioniert hier gut. Auch sonst keine weiteren Probleme damit gemeldet…
16.13.2/8.1.2 funktioniert auch nicht?
-
-
assigned issue to
-
assigned issue to
-
reporter Leider weiterhin kein Glück. Eine 16.13 bekomme ich gar nicht zur Auswahl als stable. Müsste ich höchstens builden.
Auf was für einem System buildet ihr denn? Ich bin auf einem Ubuntu 20.04.
-
reporter Wenn ich wieder auf die Version 14 downgrade kann ich für die v2.18.0 npm install erfolgreich laufen lassen:
dom@domsLappi2:~/Dokumente/StadtFreiburg/masterportal$ mkdir dev_hamburg dom@domsLappi2:~/Dokumente/StadtFreiburg/masterportal/dev_hamburg$ git clone --depth 1 --branch v2.18.0 https://dominikfroehlich@bitbucket.org/geowerkstatt-hamburg/masterportal.git Klone nach 'masterportal' ... remote: Enumerating objects: 1935, done. remote: Counting objects: 100% (1935/1935), done. remote: Compressing objects: 100% (1640/1640), done. remote: Total 1935 (delta 157), reused 1164 (delta 86), pack-reused 0 Empfange Objekte: 100% (1935/1935), 5.94 MiB | 3.36 MiB/s, fertig. Löse Unterschiede auf: 100% (157/157), fertig. Hinweis: Wechsle zu 'bc4ed05dcd662afa3a275bff7cf08de32cf2eec2'. Sie befinden sich im Zustand eines 'losgelösten HEAD'. Sie können sich umschauen, experimentelle Änderungen vornehmen und diese committen, und Sie können alle möglichen Commits, die Sie in diesem Zustand machen, ohne Auswirkungen auf irgendeinen Branch verwerfen, indem Sie zu einem anderen Branch wechseln. Wenn Sie einen neuen Branch erstellen möchten, um Ihre erstellten Commits zu behalten, können Sie das (jetzt oder später) durch Nutzung von 'switch' mit der Option -c tun. Beispiel: git switch -c <neuer-Branchname> Oder um diese Operation rückgängig zu machen: git switch - Sie können diesen Hinweis ausschalten, indem Sie die Konfigurationsvariable 'advice.detachedHead' auf 'false' setzen. dom@domsLappi2:~/Dokumente/StadtFreiburg/masterportal/dev_hamburg$ ll insgesamt 12 drwxrwxr-x 3 dom dom 4096 Feb 24 10:42 ./ drwxrwxr-x 4 dom dom 4096 Feb 24 10:39 ../ drwxrwxr-x 15 dom dom 4096 Feb 24 10:42 masterportal/ dom@domsLappi2:~/Dokumente/StadtFreiburg/masterportal/dev_hamburg$ cd masterportal/ om@domsLappi2:~/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal$ sudo snap remove node [sudo] Passwort für dom: node entfernt dom@domsLappi2:~/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal$ sudo snap install node --channel=14/stable --classic node (14/stable) 14.19.0 aus OpenJS Foundation (iojs✓) installiert dom@domsLappi2:~/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal$ npm install npm WARN lifecycle The node binary used for scripts is /snap/bin/node but npm is using /snap/node/5856/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with. > nodent-runtime@3.2.1 install /home/dom/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal/node_modules/nodent-runtime > node build.js ## Built /home/dom/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal/node_modules/nodent-runtime/dist/index.js > canvas@2.8.0 install /home/dom/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal/node_modules/canvas > node-pre-gyp install --fallback-to-build [canvas] Success: "/home/dom/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal/node_modules/canvas/build/Release/canvas.node" is installed via remote > core-js@2.6.12 postinstall /home/dom/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal/node_modules/@babel/runtime-corejs2/node_modules/core-js > node -e "try{require('./postinstall')}catch(e){}" Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library! The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -) > core-js@3.20.2 postinstall /home/dom/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal/node_modules/masterportalAPI/node_modules/core-js > node -e "try{require('./postinstall')}catch(e){}" > core-js@3.20.2 postinstall /home/dom/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal/node_modules/mock-local-storage/node_modules/core-js > node -e "try{require('./postinstall')}catch(e){}" > core-js@3.15.2 postinstall /home/dom/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal/node_modules/core-js > node -e "try{require('./postinstall')}catch(e){}" > masterportal@2.18.0 prepare /home/dom/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal > husky install husky - Git hooks installed npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) added 1638 packages from 1009 contributors and audited 1647 packages in 137.58s 105 packages are looking for funding run `npm fund` for details found 40 vulnerabilities (2 low, 21 moderate, 17 high) run `npm audit fix` to fix them, or `npm audit` for details
Wenn ich dann aber builden will bekomme ich seltsamerweise das:
dom@domsLappi2:~/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal$ npm run build npm WARN lifecycle The node binary used for scripts is /snap/bin/node but npm is using /snap/node/5856/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with. > masterportal@2.18.0 build /home/dom/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal > node devtools/tasks/build.js ? Pfad zum Ordner mit Portalen ausgehend von "[...]/masterportal/": portal NOTICE: Building portals. Please wait... Error: ENOENT: no such file or directory, open '/home/dom/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal/dist/build/js/masterportal.js' at Object.openSync (fs.js:497:3) at Object.readFileSync (fs.js:393:35) at prependVersionAndTime (/home/dom/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal/devtools/tasks/prependVersionNumber.js:7:26) at /home/dom/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal/devtools/tasks/buildFunctions.js:76:9 at processTicksAndRejections (internal/process/task_queues.js:95:5) { errno: -2, syscall: 'open', code: 'ENOENT', path: '/home/dom/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal/dist/build/js/masterportal.js' } dom@domsLappi2:~/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal$ node -v v14.19.0 dom@domsLappi2:~/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal$ npm -v 6.14.16
Ist das bekannt oder bin ich der einzige bei dem das passiert?
EDIT: Der Fehler tritt auch auf, wenn ich vorher manuell eine
/home/dom/Dokumente/StadtFreiburg/masterportal/dev_hamburg/masterportal/dist/build/js/masterportal.js
anlege…EDIT2: Die v2.17.1 buildet in der selben Konfiguration erfolgreich. Diesmal wieder vom server, geht schneller, aber identisches Fehlerbild. Beide Ubuntu 20.04
root@geodev4:~/mp_dev# mkdir hamburg_2_17 root@geodev4:~/mp_dev# cd hamburg_2_17/ root@geodev4:~/mp_dev/hamburg_2_17# root@geodev4:~/mp_dev/hamburg_2_17# root@geodev4:~/mp_dev# cd hamburg_2_17/ -bash: root@geodev4:~/mp_dev#: No such file or directory root@geodev4:~/mp_dev/hamburg_2_17# git clone --depth 1 --branch v2.17.1 https://dominikfroehlich@bitbucket.org/geowerkstatt-hamburg/masterportal.git Cloning into 'masterportal'... remote: Enumerating objects: 1916, done. remote: Counting objects: 100% (1916/1916), done. remote: Compressing objects: 100% (1625/1625), done. remote: Total 1916 (delta 152), reused 1114 (delta 83), pack-reused 0 Receiving objects: 100% (1916/1916), 5.88 MiB | 11.67 MiB/s, done. Resolving deltas: 100% (152/152), done. Note: switching to 'cb1db942ffec13c810cb1b1acd25bd826f0b9896'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c <new-branch-name> Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false root@geodev4:~/mp_dev/hamburg_2_17# cd masterportal/ root@geodev4:~/mp_dev/hamburg_2_17/masterportal# npm install npm WARN lifecycle The node binary used for scripts is /snap/bin/node but npm is using /snap/node/5856/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with. > nodent-runtime@3.2.1 install /root/mp_dev/hamburg_2_17/masterportal/node_modules/nodent-runtime > node build.js ## Built /root/mp_dev/hamburg_2_17/masterportal/node_modules/nodent-runtime/dist/index.js > canvas@2.8.0 install /root/mp_dev/hamburg_2_17/masterportal/node_modules/canvas > node-pre-gyp install --fallback-to-build [canvas] Success: "/root/mp_dev/hamburg_2_17/masterportal/node_modules/canvas/build/Release/canvas.node" is installed via remote > core-js@2.6.12 postinstall /root/mp_dev/hamburg_2_17/masterportal/node_modules/@babel/runtime-corejs2/node_modules/core-js > node -e "try{require('./postinstall')}catch(e){}" Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library! The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -) > core-js@3.20.2 postinstall /root/mp_dev/hamburg_2_17/masterportal/node_modules/masterportalAPI/node_modules/core-js > node -e "try{require('./postinstall')}catch(e){}" Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library! The project needs your help! Please consider supporting of core-js: > https://opencollective.com/core-js > https://patreon.com/zloirock > https://paypal.me/zloirock > bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -) > core-js@3.15.2 postinstall /root/mp_dev/hamburg_2_17/masterportal/node_modules/core-js > node -e "try{require('./postinstall')}catch(e){}" Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library! The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -) npm WARN lifecycle masterportal@2.17.1~prepare: cannot run in wd masterportal@2.17.1 husky install (wd=/root/mp_dev/hamburg_2_17/masterportal) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) added 1644 packages from 1362 contributors and audited 1654 packages in 44.609s 105 packages are looking for funding run `npm fund` for details found 45 vulnerabilities (2 low, 25 moderate, 18 high) run `npm audit fix` to fix them, or `npm audit` for details root@geodev4:~/mp_dev/hamburg_2_17/masterportal# npm run build npm WARN lifecycle The node binary used for scripts is /snap/bin/node but npm is using /snap/node/5856/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with. > masterportal@2.17.1 build /root/mp_dev/hamburg_2_17/masterportal > node devtools/tasks/build.js ? Pfad zum Ordner mit Portalen ausgehend von "[...]/masterportal/": portal NOTICE: Building portals. Please wait... root@geodev4:~/mp_dev/hamburg_2_17/masterportal#
-
reporter Ja, ich bin vermutlich der einzige bei dem das passiert. Entscheidend scheint zu sein, dass ich die API mit einbinde
npm install git+https://bitbucket.org/geowerkstatt-hamburg/masterportalapi.git
Wenn ich die weglasse kann ich mit der v14 auch builden. Allerdings dann natürlich ohne API…
-
Ich habe bei mir (in einem anderen Projekt, in dem die masterportalAPI eingebunden ist) auch schon beobachten können, dass NPM (auch unter Windows) mit Git-Modulen “irgendwie Probleme” hat. Das scheint auch mit der Lockfile zusammenzuhängen. Bei mir konnte ich das Problem lösen, indem ich Lockfile, node_modules, und meinen NPM Cache gelöscht habe, um dann neu zu installieren.
Nach der Installation empfehle ich im node_modules-Ordner nachzusehen, ob die richtige Version der masterportalAPI bezogen wurde. Die steht dort mit in der package.json.
Bei mir hörten die Probleme dann nach einmaliger Durchführung auch auf. (Hier könnte es nur schwieriger werden, wenn durch das Fehlen der Lockfile dann wieder andere Bugs auftreten sollten …)
Nachtrag:
Mir fällt auch gerade auf, dass die Lockfile-Version im ersten Install nicht zur Node-Version passte, und dass die 2.17 hier auch noch relevant ist. Vielleicht ist hier etwas mit den Versionen durcheinandergekommen? Der Dev-Stand sollte eigentlich nicht
npm ERR! npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm ERR! npm WARN old lockfile so supplemental metadata must be fetched from the registry.
produzieren.
Vielleicht hilft neu auschecken, Node-Version sicherstellen, und frisch installieren ja mittlerweile, wo sich alles “zurechtgeruckelt” haben sollte, auch?
-
@Dominik Fröhlich Gibt es hierzu schon etwas Neues, bzw. hat sich das unterdessen zurechtgeruckelt?
-
- changed status to on hold
Da hier Rückmeldung fehlt, stelle ich das Ticket auf "On Hold" um. Sollte es Neuerungen geben, gerne wieder auf "Open" schieben.
Viele Grüße
-
reporter Hallo,
zurechtgeruckelt hat sich da leider bisher nichts. Es failed gerade auch wieder npm install für ein frisch ausgechecktes 2.19.0 (schon ohne die API):
dom@domsLappi2:~/Dokumente/StadtFreiburg/masterportal/2_19_0/masterportal$ npm install npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated axios@0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410 npm WARN deprecated core-js@1.2.7: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. npm ERR! code 1 npm ERR! path /home/dom/Dokumente/StadtFreiburg/masterportal/2_19_0/masterportal/node_modules/canvas npm ERR! command failed npm ERR! command sh -c node-pre-gyp install --fallback-to-build npm ERR! A complete log of this run can be found in: npm ERR! /home/dom/.npm/_logs/2022-03-24T07_38_57_240Z-debug-0.log dom@domsLappi2:~/Dokumente/StadtFreiburg/masterportal/2_19_0/masterportal$ node -v v16.14.0 dom@domsLappi2:~/Dokumente/StadtFreiburg/masterportal/2_19_0/masterportal$ npm -v 8.5.5
-
Das mit dem
node-pre-gyp
kommt mir bekannt vor. Kann es sein, dass da ein Corporate Network im Weg ist, das den direkten Zugriff zum Internet blockiert, und NPM hier über einen Proxy geleitet wird? Ich meine in dem Kontext ging das manchmal schief bei mir, weil untergeordnete Installationsprozesse dann diesen Proxy nicht kennen.(Arbeite mittlerweile auf einem Rechner im “normalen” Internet, deswegen kann ich das aktuell nicht gegenprüfen. Ist aber auch nur ein Ansatz.Beinhält
/home/dom/.npm/_logs/2022-03-24T07_38_57_240Z-debug-0.log
etwas Nützliches?Sonst fiele mir noch etwas wie
npm install --loglevel silly > sillylog.txt
ein, um einmal alles abzugreifen. Die Fehlermeldung aus dem normalennpm i
oben ist ja leider nicht sehr sprechend. -
reporter Hmm, nein, gestern war ich im HO, das war nur mein privates WLAN. Ein Proxy gibts da nicht.
Die log hat leider auch nichts insteressantes. Das sillylog ist aber eien gute Idee, das probiere ich gleich mal. Danke!Gruß
Dominik
-
reporter Die Fehlermeldung sit leider selbst auf silly nicht sehr aussagekräftig:
npm timing build:link:node_modules/webpack-dev-middleware/node_modules/mkdirp Completed in 106ms npm timing build:link Completed in 138ms npm info run canvas@2.8.0 install node_modules/canvas node-pre-gyp install --fallback-to-build npm info run nodent-runtime@3.2.1 install node_modules/nodent-runtime node build.js npm info run nodent-runtime@3.2.1 install { code: 0, signal: null } npm timing build:run:install:node_modules/nodent-runtime Completed in 378ms npm info run canvas@2.8.0 install { code: 1, signal: null } npm timing reify:rollback:createSparse Completed in 6476ms npm timing reify:rollback:retireShallow Completed in 0ms npm timing command:install Completed in 52220ms npm verb stack Error: command failed npm verb stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27) npm verb stack at ChildProcess.emit (node:events:520:28) npm verb stack at maybeClose (node:internal/child_process:1092:16) npm verb stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) npm verb pkgid canvas@2.8.0 npm verb cwd /home/dom/Dokumente/StadtFreiburg/masterportal/2_19_0/masterportal npm verb Linux 5.4.0-105-generic npm verb argv "/snap/node/5953/bin/node" "/usr/local/bin/npm" "install" "--loglevel" "silly" npm verb node v16.14.0 npm verb npm v8.5.5 npm ERR! code 1 npm ERR! path /home/dom/Dokumente/StadtFreiburg/masterportal/2_19_0/masterportal/node_modules/canvas npm ERR! command failed npm ERR! command sh -c node-pre-gyp install --fallback-to-build npm verb exit 1 npm timing npm Completed in 53010ms npm verb unfinished npm timer reify 1648116214021 npm verb unfinished npm timer reify:build 1648116258881 npm verb unfinished npm timer build 1648116258893 npm verb unfinished npm timer build:deps 1648116258895 npm verb unfinished npm timer build:run:install 1648116259185 npm verb unfinished npm timer build:run:install:node_modules/canvas 1648116259187 npm verb code 1 npm ERR! A complete log of this run can be found in: npm ERR! /home/dom/.npm/_logs/2022-03-24T10_03_33_237Z-debug-0.log
-
Ich habe mal im Team rumgefragt, manche hatten ähnliche Fehler, wenn in den Addons etwas fehlte. Sind die da? Falls ja, hilft da wohl ein npm i im Addons-Ordner.
Aber ich fürchte hier ist es gar nicht so einfach, sondern es liegt an einem Fehler im Canvas-Modul. Ich habe zu Ubuntu 20 und der im Masterportal verwendeten Canvas-Version dies hier gefunden, das passen könnte: https://github.com/Automattic/node-canvas/issues/1815
Sind nvm oder snap (kenne ich gar nicht …) auf dem Rechner im Einsatz? Scheinbar kann es daran haken. Aber das Issue ist jetzt auch wieder älter und antwortarm, obwohl am 25. Januar jemand dasselbe Problem gemeldet hat … Bin da jetzt leider etwas ratlos.
-
reporter Das klingt ziemlich danach. Schade, dass der Therad keine wirkliche Lösung hat und das Problembewusstsein der Paketmaintainer auch nicht allzu groß zu sein scheint…
nvm ist der Node Version Manager. Sehr praktisch wenn man verschiedene Versionen von node braucht, z.B. für verschiedene Masterportal Versionen…
snap ist eine multi-Distributions/-Plattform Paketquelle für z.B. Ubuntu-Pakete. Die apt Version von node in Ubuntu ist z.B. uralt. Über snap bekommt man aber deutlich neuere.
Über was installiert ihr node versionen? -
Nur snap kannte ich nicht, bei Dataport haben die meisten Geoentwickler “nvm for Windows” drauf. Aber auf Windows funktioniert das mit canvas problemlos.
Ich habe mir mal eine Ubuntu-Maschine besorgt, damit ich vielleicht mal an den Versionen drehen kann um es lauffähig zu machen. Aber Dev-Stand und v2.19.0 konnte ich bei mir direkt installieren mit:
$ npm -v 8.3.1 $ node -v v16.14.0 $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal
Da war jetzt kein nvm drauf, also ist vielleicht wirklich das das Problem. Oder aber die Angabe in der package.json stimmt nicht ganz, und statt >= sollte es doch = sein? Man könnte es ja einmal mit 16.14.0 und einmal ohne nvm probieren … wobei ich nvm jetzt wirklich nicht missen wollen würde.
-
Noch ein Ansatz: checkt mal ob und welche python-version installiert ist auf den verschiedenen systemen. Kann unter Umständen zu Problemen bei node-gyp führen. https://github.com/nodejs/node-gyp
-
reporter Ok, interesant. Wie hast du die node version installiert? Auch als snap?
Ich habe mal die npm Version angepasst:
~$ sudo npm install -g npm@8.3.1 [sudo] Passwort für dom: removed 3 packages, changed 70 packages, and audited 215 packages in 7s 10 packages are looking for funding run `npm fund` for details 3 moderate severity vulnerabilities To address all issues, run: npm audit fix Run `npm audit` for details.
Das brachte aber leider auch keien Änderung. Den nvm habe ich ich hier gar nicht drauf.
Die Python Version ist
$ python3 -V Python 3.8.10
Das müsste die default Version sein. Da habe ich glaube ich nichts dran gemacht.
-
Ich glaube, ich habe nur
sudo apt install nodejs
ausgeführt. Erinnere mich noch, dass das dann die falsche Version war und ich das exakt auf die im Masterportal erwähnte nachinstalliert habe. -
reporter genau. Die apt Version ist zu alt. Daher hab ich über snap die 16er gezogen…
-
Ach stimmt, so war das. Ich glaube nach der Art von https://joshtronic.com/2021/05/09/how-to-install-nodejs-16-on-ubuntu-2004-lts/ habe ich das gelöst.
-
reporter Hmm, ja, das ist eine manuelle Installation. Die vermurkst einem halt die Paketverwaltung. Das würde ich also spätestens auf dem dev server eher nicht so machen.
-
Manuell klingt zwar schon immer irgendwie unvernünftig/unsauber, andererseits scheint es ja der einzige Weg zu sein, auf dem es funktioniert. Wobei mir jetzt nicht klar ist, warum die Wege über Installationstools scheitern. Oder vielleicht auch, warum canvas an ihnen scheitert … der springende Punkt, warum es mit Tools nicht klappt, ist mir nicht klar. Hast du da irgendwas rausgelesen, woran es liegt? (Du scheinst da ja auch tiefer in der Ubuntu-Materie zu sein.)
Ansonsten habe ich mal versucht canvas einfach zu deinstallieren, da es augenscheinlich nirgends gebraucht wird. Aber offenbar hat irgendwas das als optionale Abhängigkeit für die Vue-Tests, die gehen ohne nämlich in die Brüche, wo nämlich ein <canvas> während der Tests gebraucht und “gerendert” wird. Du könntest also für lokales Arbeiten canvas einfach aus der package.json nehmen; Dev-Mode und Build funktionieren trotzdem, ist ja “nur” für Tests. Aber eine richtige Lösung ist das halt auch nicht.
-
- changed status to open
Stelle mal wieder auf "Open", da hier ja was los ist.
@geowerkstatt Wie seht ihr dieses Thema eigentlich? Kurzfassung: Dadurch, dass das Masterportal Node@16 als Voraussetzung hat, welches auf dem aktuellen Ubuntu aber nicht direkt über apt verfügbar ist (ohne das manuell zu installieren), unterstützt das Masterportal quasi Ubuntu (als Entwicklungs-/Bauumgebung) derzeit nicht. Müsste es das tun?
-
reporter Ah, ja wenn das nur für die tests gebraucht wird werfe ich canvas einfach raus. Ich mache ja in der Regel nur kleiner Änderungen und integriere Plugins und ob die funktionieren muss ich eh selbst testen.
Was das Problem ist steht schon im git: “It seems that there should be a prebuilt binary available for this platform, but it was not downloaded.” Den Download lassen die Sicherheitsrichtlinien des snap Pakets offenbar nicht zu.
-
- changed status to open
-
- changed status to closed
Moin,
da es hier ja eher um das Setup für Linux und weniger das Masterportal geht, schließe ich das Issue einmal. Wobei es natürlich schön wäre DEN Weg zu kennen, NPM/Node so zu installieren, dass es für alles – auch das canvas-Paket – funktioniert. Aber scheinbar bleibt da für die aktuellen Node-Versionen derzeit nur apt händisch anzupacken ... :|
Wenn du noch einen Ansatz hast, für den man das Masterportal ändern müsste, mach gern ein neues Issue auf.
Viele Grüße
- Log in to comment
added versions