Unable to install Express (of Node.js) in Android Termux using sdcard0 as directory I'm unable to install Express in Android Termux. I have the latest Node.js installed.
It is working perfectly when I use Private storage, but I'm using cd /storage/sdcard0/NodeJS/Test/ and getting a permission denied error. I saw the word symlink repeatedly in the terminal's error message.
Here's what I saw after commanding npm install express --save:
$ npm install express --save
npm WARN test-lab@1.0.0 No description
npm WARN test-lab@1.0.0 No repository field.

npm ERR! path ../mime/cli.js
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall symlink
npm ERR! Error: EACCES: permission denied, symlink '../mime/cli.js' -&gt; '/storage/sdcard0/NodeJS/Test/3/node_modules/.bin/mime'
npm ERR!  { Error: EACCES: permission denied, symlink '../mime/cli.js' -&gt; '/storage/sdcard0/NodeJS/Test/3/node_modules/.bin/mime'
npm ERR!   cause:
npm ERR!    { Error: EACCES: permission denied, symlink '../mime/cli.js' -&gt; '/storage/sdcard0/NodeJS/Test/3/node_modules/.bin/mime'
npm ERR!      errno: -13,
npm ERR!      code: 'EACCES',
npm ERR!      syscall: 'symlink',
npm ERR!      path: '../mime/cli.js',
npm ERR!      dest: '/storage/sdcard0/NodeJS/Test/3/node_modules/.bin/mime' },
npm ERR!   stack: 'Error: EACCES: permission denied, symlink \'../mime/cli.js\' -&gt; \'/storage/sdcard0/NodeJS/Test/3/node_modules/.bin/mime\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '../mime/cli.js',
npm ERR!   dest: '/storage/sdcard0/NodeJS/Test/3/node_modules/.bin/mime',
npm ERR!   parent: 'test-lab' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR!     /data/data/com.termux/files/home/.npm/_logs/2018-05-29T13_09_20_748Z-debug.log


Is it really possible to install Express while current storage is something like /storage/sdcard0/...?
Unfortunately, the answer is No, not even with root.

Android uses FUSE (Filesystem in USErspace), which has symbolic links disabled. Since Node needs to setup symlinks, it's impossible to install it onto the SD card (or whatever internal storage where you store your photos, downloads, etc.). You can only install it into Termux's directory, which is /data/data/com.termux/files.