Termux-app: Unable to install express ( of node.js) in Android termux using sdcard0 as directory

Created on 29 May 2018  路  7Comments  路  Source: termux/termux-app

I'm unable to install express in Android termux. I have latest nodejs installed. It is working perfectly when I use Private storage but I'm using cd /storage/sdcard0/NodeJS/Test/ and getting 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 [email protected] No description
npm WARN [email protected] 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' -> '/storage/sdcard0/NodeJS/Test/3/node_modules/.bin/mime'
npm ERR!  { Error: EACCES: permission denied, symlink '../mime/cli.js' -> '/storage/sdcard0/NodeJS/Test/3/node_modules/.bin/mime'
npm ERR!   cause:
npm ERR!    { Error: EACCES: permission denied, symlink '../mime/cli.js' -> '/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\' -> \'/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/....... ?

Most helpful comment

Sure, mv them to /sdcard and edit them all you want. You just can't keep executable files or make symlinks in /sdcard.

You can probably access the files without moving them if you are rooted and have the right apps installed.

Edit: making a good text editor (that's better than emacs or vim) sounds like a huge project, contributions are welcome of course.

All 7 comments

It's not possible in shared storage due to Android's security features. See for example https://github.com/termux/termux-packages/issues/2459, https://github.com/termux/termux.github.io/issues/35, https://github.com/termux/termux-packages/issues/2076 for more information.

Then, is it possible to open Termux private files in an Androidtext editor app ?
Termux apps like vim are not actually good and I can never make a good website using text editors like vim. I would like to know if I could open those private files in Quoda Android app in any way such as making an ftp server using Termux ( with the home root set as Termux private folder) and accessing the ftp using ES File explorer and ftp friendly text editors.

I would recommend Termux developers to add an inbuilt file explorer and text editor for Termux(Which can have three storage options 1: App-Private, 2: Internal memory 3: External memory) because thousands of Termux users are using vim like(not only vim) text editors because they don't have any other choice.

  • the greatest terminal
  • inbuilt file explorer for both App-Private files, sdcard0 files and sdcard1 files
  • Inbuilt text editor.
    It will be really awesome.

What do you think?
Comment it out...

Sure, mv them to /sdcard and edit them all you want. You just can't keep executable files or make symlinks in /sdcard.

You can probably access the files without moving them if you are rooted and have the right apps installed.

Edit: making a good text editor (that's better than emacs or vim) sounds like a huge project, contributions are welcome of course.

I've tried making an ftp using Termux and using the Termux App-Private folder as ftp home directory but it's not working. Does anyone knows?
Do I have to make another new issue on GitHub?

I suggest that you open a new issue and provide the commands you ran as well as the error you get.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

darth-cequella picture darth-cequella  路  3Comments

rjsteinert picture rjsteinert  路  4Comments

joakim-noah picture joakim-noah  路  5Comments

msh2050 picture msh2050  路  4Comments

gerroon picture gerroon  路  5Comments