Files
mkdocs/docs/Synology/dsm7/node.md
2025-03-25 15:52:48 +01:00

4.2 KiB
Raw Permalink Blame History

Node.js

Paquets Synology

bruno@DS916:/volume1/@appstore/Node.js_v18/usr/local $ cd bin/
total 47520
drwxr-xr-x 1 root root       30 Oct 26  2022 .
drwxr-xr-x 1 root root       18 Oct 26  2022 ..
lrwxrwxrwx 1 root root       45 Oct 26  2022 corepack -> ../lib/node_modules/corepack/dist/corepack.js
-rwxr-xr-x 1 root root 48651256 Oct 26  2022 node
lrwxrwxrwx 1 root root       38 Oct 26  2022 npx -> ../lib/node_modules/npm/bin/npx-cli.js

Installer nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash

$ nvm -v
0.40.0

Installer node=lts/fermium (ou mettre-à-jour)

nvm install --lts=hydrogen
$ which node
/var/services/homes/bruno/.nvm/versions/node/v20.11.0/bin/node

Mettre-à-jour npm:

npm -g install npm

Réinstaller les paquets d'une ancienne version après une mise-à jour:

nvm reinstall-packages 14.17.0

npm

$ which npm
/var/services/homes/bruno/.nvm/versions/node/v20.11.0/bin/npm

$ npm doctor

Check                               Value   Recommendation/Notes
npm ping                            ok
npm -v                              not ok  Use npm v10.8.2
node -v                             not ok  Use node v20.16.0 (current: v20.11.0)
npm config get registry             ok      using default registry (https://registry.npmjs.org/)
git executable in PATH              ok      /usr/local/bin/git
global bin folder in PATH           not ok  Error: Add /volume1/homes/bruno/.nvm/versions/node/v20.11.0/bin to your $PATH
Perms check on cached files         ok
Perms check on local node_modules   ok
Perms check on global node_modules  ok
Perms check on local bin folder     ok
Perms check on global bin folder    ok
npm WARN verifyCachedFiles Content garbage-collected: 9 (5411539 bytes)
npm WARN verifyCachedFiles Cache issues have been fixed
Verify cache contents               ok      verified 380 tarballs
npm notice
npm notice New minor version of npm available! 10.4.0 -> 10.8.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.2
npm notice Run npm install -g npm@10.8.2 to update!
npm notice
npm ERR! Some problems found. See above for recommendations.

npm ERR! A complete log of this run can be found in: /var/services/homes/bruno/.npm/_logs/2024-08-21T07_58_05_115Z-debug-0.log

Installer thumbsup

npm -g install thumbsup

which thumbsup
/var/services/homes/bruno/.nvm/versions/node/v14.17.3/bin/thumbsup
cd /volume1/photo/thumbsup
total 32
drwxrwxrwx+ 1 bruno  138862 286 Mar 15 10:56 .
drwxrwxrwx+ 1 138862 138862 588 Aug  9 08:35 ..
-rwxrwxrwx+ 1 bruno  users  487 Mar 14 18:19 config.json
-rwxrwxrwx+ 1 bruno  users  487 Mar 15 10:37 config.json.bak
-rwxrwxrwx+ 1 bruno  users  440 Mar 12 06:51 config-npm.json
drwxrwxrwx+ 1 root   root   126 Dec  5  2020 @eaDir
drwxrwxrwx+ 1 bruno  users  144 Mar 15 11:39 .git
-rwxrwxrwx+ 1 bruno  users    9 Mar 15 10:56 .gitignore
-rwxrwxrwx+ 1 bruno  users  155 Mar 15 10:44 readme.md
drwxrwxrwx+ 1 bruno  users  124 Mar 14 12:48 theme-flow
drwxrwxrwx+ 1 bruno  users  122 Nov 29  2020 theme-flow-bruno
-rwxrwxrwx  1 bruno  users   24 Nov 15  2020 theme_options.json
-rwxrwxrwx+ 1 bruno  users  428 Mar 14 11:58 thumbsup.sh
-rwxrwxrwx+ 1 bruno  users  365 Mar 15 10:11 thumbsup_update.sh

Configurer thumsup

https://thumbsup.github.io/docs/3-configuration/usage/

nano config.json
{
        "input": "/input/Flore",
        "output": "/output/gallery",
        "exclude": ["_Archived Items/","thumbsup"],
        "include-raw-photos": true,
        "thumb-size": 250,
        "large-size": 1600,
        "photo-download": "symlink",
        "cleanup": true,
        "sort-albums-by": "title",
        "sort-media-by": "date",
        "sort-media-direction": "desc",
        "home-album-name": "Accueil",
        "theme-path": "/input/thumbsup/theme-flow/theme",
        "title": "Photos...",
        "embed-exif": true,
        "locale": "fr",
        "footer": "bruno@clicclac.info"
}



thumbsup --config config.json