Skip to main content

how to install React 100% work on termux


In order to install react and create an app using create-react-app on Termux you have to do the following:
Install npx if you haven't done so:
$ npm install -g npx
Install create-react-app
$ npm install create-react-app -g
Clean your npm cache to avoid the 'ERR! cb() never called!' error
$ npm cache clean --force
If you want to create an app called 'apprx' first create the folder and then open it:
mkdir apprx && cd apprx
now create the following file;
$ touch .gitignore
Go back up one level
$ cd ../
Run the 'create-react-app':
$ npx create-react-app apprx
It will take a while but it will setup. Once done:
$ cd apprx
Start the app
$ npm start
Tested this on a Huawei M5 8, Samsung Note 8,
vivo y92

More Tutorial

Comments

  1. sir can i install this in sdcard com.termux/data pls reply

    ReplyDelete
    Replies
    1. Yes I can install like that, thanks for blogs owner

      Delete
  2. I am getting this error.
    Error: EPERM: operation not permitted, symlink '../../../../browserslist/cli.js' -> '/storage/emulated/0/app/node_modules/@babel/compat-data/node_modules/.bin/browserslist'

    ReplyDelete
    Replies
    1. type $ termux-setup-storage
      it will allow permisson of read localstorage

      Delete
  3. This is because you didn't created .gitignore file manually.

    ReplyDelete
  4. Error


    npm ERR! Maximum call stack size exceeded

    npm ERR! A complete log of this run can be found in:
    npm ERR! /data/data/com.termux/files/home/.npm/_logs/2020-10-24T02_18_57_947Z-debug.log

    ReplyDelete
  5. home diectory path for sdcard


    change bash.bashrc file of etc directory
    create folder termuxhome in sdcard

    add lines in bash.bash.rc by nano



    HOME=/storage/emulated/0/termuxhome
    cd $HOME

    ReplyDelete
  6. Error: Package exports for '/data/data/com.termux/files/home/my-app/node_modules/postcss-safe-parser/node_modules/postcss' do not define a valid '.' target

    ReplyDelete
  7. Error ELIFECYCLE ..help😢

    ReplyDelete
  8. Aborting installation.
    npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

    Deleting generated file... node_modules
    Deleting generated file... package.json
    Deleting apprx/ from /data/data/com.termux/files/home/app

    ReplyDelete

Post a Comment

Popular Posts