GeotrekCE / Geotrek-rando

Geotrek public trekking website
http://geotrek.fr
28 stars 18 forks source link

Problème installation Geotrek-rando 2.24.1 #760

Closed chanteclair12 closed 4 years ago

chanteclair12 commented 4 years ago

Bonjour, Nous tentons (un collègue et moi-même) d'installer Geotrek-rando sur une VM Ubuntu 18.04.4 LTS. Nous avons donc téléchargé le zip de la version 2.24.1. Nous avons installé node.js, version v14 puis avons lancé la commande npm install. Cela a produit un certain nombre d'erreurs (ci-dessous) :

` administrateur@VM-GEOTREK:/etc/geotrek/Geotrek-rando-2.24.1$ npm install npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it! npm WARN deprecated phantomjs-prebuilt@2.1.16: this package is now deprecated npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN checkPermissions Missing write access to /etc/geotrek/Geotrek-rando-2.24.1 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/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 ERR! code EACCES npm ERR! syscall access npm ERR! path /etc/geotrek/Geotrek-rando-2.24.1 npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, access '/etc/geotrek/Geotrek-rando-2.24.1' npm ERR! [Error: EACCES: permission denied, access '/etc/geotrek/Geotrek-rando-2.24.1'] { npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/etc/geotrek/Geotrek-rando-2.24.1' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in: npm ERR! /home/adm070720/.npm/_logs/2020-07-07T09_42_41_636Z-debug.log `

La commande npm run dist a renvoyé : ` administrateur@VM-GEOTREK:/etc/geotrek/Geotrek-rando-2.24.1$ npm run dist

geotrekrando@2.24.1 dist /etc/geotrek/Geotrek-rando-2.24.1 gulp sh: 1: gulp: not found npm ERR! code ELIFECYCLE npm ERR! syscall spawn npm ERR! file sh npm ERR! errno ENOENT npm ERR! geotrekrando@2.24.1 dist: gulp npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the geotrekrando@2.24.1 dist script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm WARN Local package.json exists, but node_modules missing, did you mean to install? npm ERR! A complete log of this run can be found in: npm ERR! /home/adm070720/.npm/_logs/2020-07-07T09_44_03_168Z-debug.log `

A tout hasard, nous avons relancé les mêmes commandes en sudo avec les résultats suivants :

` administrateur@VM-GEOTREK:/etc/geotrek/Geotrek-rando-2.24.1$ sudo npm install npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it! npm WARN deprecated phantomjs-prebuilt@2.1.16: this package is now deprecated npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

bufferutil@1.2.1 install /etc/geotrek/Geotrek-rando-2.24.1/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/bufferutil node-gyp rebuild gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/etc/geotrek/Geotrek-rando-2.24.1/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/bufferutil/build' gyp ERR! System Linux 5.3.0-1028-azure gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /etc/geotrek/Geotrek-rando-2.24.1/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/bufferutil gyp ERR! node -v v14.5.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok utf-8-validate@1.2.1 install /etc/geotrek/Geotrek-rando-2.24.1/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/utf-8-validate node-gyp rebuild gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/etc/geotrek/Geotrek-rando-2.24.1/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/utf-8-validate/build' gyp ERR! System Linux 5.3.0-1028-azure gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /etc/geotrek/Geotrek-rando-2.24.1/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/utf-8-validate gyp ERR! node -v v14.5.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok node-sass@4.5.3 install /etc/geotrek/Geotrek-rando-2.24.1/node_modules/node-sass node scripts/install.js Unable to save binary /etc/geotrek/Geotrek-rando-2.24.1/node_modules/node-sass/vendor/linux-x64-83 : Error: EACCES: permission denied, mkdir '/etc/geotrek/Geotrek-rando-2.24.1/node_modules/node-sass/vendor' at Object.mkdirSync (fs.js:947:3) at sync (/etc/geotrek/Geotrek-rando-2.24.1/node_modules/mkdirp/index.js:71:13) at Function.sync (/etc/geotrek/Geotrek-rando-2.24.1/node_modules/mkdirp/index.js:77:24) at checkAndDownloadBinary (/etc/geotrek/Geotrek-rando-2.24.1/node_modules/node-sass/scripts/install.js:111:11) at Object. (/etc/geotrek/Geotrek-rando-2.24.1/node_modules/node-sass/scripts/install.js:154:1) at Module._compile (internal/modules/cjs/loader.js:1201:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10) at Module.load (internal/modules/cjs/loader.js:1050:32) at Function.Module._load (internal/modules/cjs/loader.js:938:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) { errno: -13, syscall: 'mkdir', code: 'EACCES', path: '/etc/geotrek/Geotrek-rando-2.24.1/node_modules/node-sass/vendor' } phantomjs-prebuilt@2.1.16 install /etc/geotrek/Geotrek-rando-2.24.1/node_modules/phantomjs-prebuilt node install.js PhantomJS not found on PATH Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2 Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 Receiving... [=============================-----------] 73% Received 22866K total. Extracting tar contents (via spawned process) Removing /etc/geotrek/Geotrek-rando-2.24.1/node_modules/phantomjs-prebuilt/lib/phantom Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1594115147042/phantomjs-2.1.1-linux-x86_64 -> /etc/geotrek/Geotrek-rando-2.24.1/node_modules/phantomjs-prebuilt/lib/phantom Phantom installation failed [Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1594115147042/phantomjs-2.1.1-linux-x86_64' -> '/etc/geotrek/Geotrek-rando-2.24.1/node_modules/phantomjs-prebuilt/lib/phantom'] { errno: -13, code: 'EACCES', syscall: 'link', path: '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1594115147042/phantomjs-2.1.1-linux-x86_64', dest: '/etc/geotrek/Geotrek-rando-2.24.1/node_modules/phantomjs-prebuilt/lib/phantom' } Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1594115147042/phantomjs-2.1.1-linux-x86_64' -> '/etc/geotrek/Geotrek-rando-2.24.1/node_modules/phantomjs-prebuilt/lib/phantom' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/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: bufferutil@1.2.1 (node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/bufferutil): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@1.2.1 install: node-gyp rebuild npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: utf-8-validate@1.2.1 (node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/utf-8-validate): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: utf-8-validate@1.2.1 install: node-gyp rebuild npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! phantomjs-prebuilt@2.1.16 install:node install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the phantomjs-prebuilt@2.1.16 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/adm070720/.npm/_logs/2020-07-07T09_45_51_376Z-debug.log

` administrateur@VM-GEOTREK:/etc/geotrek/Geotrek-rando-2.24.1$ sudo npm run dist

geotrekrando@2.24.1 dist /etc/geotrek/Geotrek-rando-2.24.1 gulp gulp[19969]: ../src/node_contextify.cc:658:static void node::contextify::ContextifyScript::New(const v8::FunctionCallbackInfo&): Assertion args[1]->IsString()' failed. 1: 0xa3ac30 node::Abort() [gulp] 2: 0xa3acae [gulp] 3: 0xa2ce13 node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo const&) [gulp] 4: 0xc1aba5 [gulp] 5: 0xc1b1af [gulp] 6: 0xc1b7d6 v8::internal::Builtin_HandleApiCall(int, unsigned long, v8::internal::Isolate) [gulp] 7: 0x13f5159 [gulp] Aborted (core dumped) npm ERR! code ELIFECYCLE npm ERR! errno 134 npm ERR! geotrekrando@2.24.1 dist: gulp npm ERR! Exit status 134 npm ERR! npm ERR! Failed at the geotrekrando@2.24.1 dist 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/adm070720/.npm/_logs/2020-07-07T09_46_17_632Z-debug.log `

Quelqu'un peut-il nous dire ce que nous avons manqué ou mal fait et la procédure à suivre svp ? En vous remerciant par avance pour l'aide que vous pourrez nous apporter. Cordialement,

camillemonchicourt commented 4 years ago

Oui c'est très certainement la version de NodeJS. Il faut une version bien antérieure. C'est la version 6 qui est indiquée, mais de mémoire ça fonctionne aussi en version 8.

gutard commented 4 years ago

Nous avons l'habitude d'utiliser https://github.com/nvm-sh/nvm pour installer la version recommandée dans le fichier .nvmrc

gutard commented 4 years ago

Avant de refaire le npm install après avoir changé de version de npm il faut supprimer le répertoire node_modules/

chanteclair12 commented 4 years ago

Merci pour ces retours rapides ! Faut-il désinstaller également ce qui a pu être installé de Geotrek-rando ou, désintaller la version node.js en question, supprimer le répertoire spécifié par @gutard est-il suffisant ? Merci.

gutard commented 4 years ago

Il n'est pas nécessaire de désinstaller Geotrek-rando. Il n'est pas nécessaire non plus de désinstaller le node.js qui vient avec la distribution. Par contre il faut bien lancer nvm use à chaque fois qu'on ouvre un nouveau shell de commande avant de lancer npm afin qu'il pointe vers la bonne version.

chanteclair12 commented 4 years ago

L'installation de Node.js en version 6 retourne : `

                          DEPRECATION WARNING

Node.js 6.x LTS Boron is no longer actively supported!

You will not receive security or critical stability updates for this version.

You should migrate to a supported version of Node.js as soon as possible. Use the installation script that corresponds to the version of Node.js you wish to install. e.g.

Faut-il continuer, passer sur la version 8 qui ne semble pas plus maintenue ?

chanteclair12 commented 4 years ago

Bonjour, Nous sommes parvenus à faire l'installation de Geotrek-rando. Subsiste un problème de paramétrage, sans doute bénin, qui fait qu'en saisissant l'Url du geotrek-rando, on ne tombe pas directement sur l'interface, mais sur une page intermédiaire avec 2 liens hypertexte ( Enter website Don't display this page anymore), le 1er permettant d'accéder au site. Nous avons vérifié la doc mais nous ne trouvons pas quel point nous fait défaut. Auriez-vous une idée svp ? Merci par avance. Cordialement

gutard commented 4 years ago

https://github.com/GeotrekCE/Geotrek-rando/blob/master/docs/settings-custom-json-all-options.md#main-options

Il faut ajouter "SHOW_HOME": false dans custom/settings.custom.json

gutard commented 4 years ago

Avez-vous refait un build après la modification ?

https://github.com/GeotrekCE/Geotrek-rando/blob/master/docs/settings-custom-json-all-options.md#settingscustomjson

To apply changes after editing settings, launch bundling task again with running npm run dist