пʼятниця, 12 липня 2019 р.

How to install Node.js on QNAP TS-219 (not working)

For some command-line operations, you may need to know the system volume path. The system volume is usually the first data volume created in your NAS, and will store certain system files in addition to your own data.
  • Execute the commands below to get the system volume path. In this example for QNAP TS-219, it is "/share/HDA_DATA"
[~] # getcfg SHARE_DEF defVolMP -f /etc/config/def_share.info 
/share/HDA_DATA

To delete folder with the files without prompt for each of file:
[~] # rm -rf "My Directory"

We should to create a new shared folder in FileStation (via Web UI)  —  for example lib.
Go to https://nodejs.org/en/ and lookup the latest TLS version (at the moment it was v6.9.1) then download it, and extract it into the created folder: 
[/share/HDA_DATA/lib]# wget https://nodejs.org/dist/v10.16.0/node-v10.16.0.tar.gz
[/share/HDA_DATA/lib]# tar zxf node-v10.16.0.tar.gz

Create a symlink:
[/share/HDA_DATA/lib]# ln -s node-v10.16.0 node



 to delete symlink use
[/share/HDA_DATA/lib]# rm node


uid-number.js file in an npm package has to be modified in order to npm works correctly — the same approach is used in app from AppCenter (but they make this on every application start just by copying the modified file):

[/share/HDA_DATA/lib]# vim 
/share/HDA_DATA/lib/node/lib/node_modules/npm/
node_modules/uid-number/uid-number.js

nie działa…………… since my CPU is ARMv5 not supported by newest Node.js

Немає коментарів:

Дописати коментар