question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EACCES error in Termux

See original GitHub issue

If you are reporting a bug, please fill in below. Otherwise feel free to remove this template entirely.

Can you reproduce the problem with latest npm?

npm --version 3.10.10

Many errors, especially related to “missing modules”, are due to npm bugs.

If you’re using Windows, follow these instructions to update npm.

If you’re using OS X or Linux, run this to update npm:

npm install -g npm@latest

cd your_project_directory
rm -rf node_modules
npm install

Then try to reproduce the issue again.

Can you still reproduce it?

Yes, npm --version 4.4.1

Description

What are you reporting?

Error thrown in node_modules/react-scripts/scripts/init.js 64 Error: EACCES: permission denied , link ‘/data/data/com.termux/files/home/projects/myapp/gitignore’ -> ‘/data/data/com.termux/files/home/projects/myapp/.gitignore’ at Error (native)

Running on an Android proot, ln is not permitted: touch a ln a b ln: b: Permission denied

Expected behavior

A react app is created.

Actual behavior

An improperly initialized react app is created. npm run start fails.

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected):

react-scripts@0.9.5

  1. node -v:

6.10.0

  1. npm -v:

4.4.1

Then, specify:

  1. Operating system:

ChromeOS running Android’s Termux

  1. Browser and version:

Chrome 57

Reproducible Demo

Install Termux on ChromeOS from Google Play Store apt update apt upgrade apt install nodejs npm install create-react-app -g npm install -g npm@latest mkdir projects cd projects create-react-app myapp <- error occurs here cd myapp npm run start <- fails

The same error occurs when using yarn. npm install -g yarn yarn --version 0.21.3

Attempting npm install -g yarn@latest or yarn global add yarn

produces a broken yarn installation.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
ghostcommented, Dec 9, 2018

This is a late solution… Due to Android’s SELinux policies, you cannot hard link as non-root (which create-react-app attempts to do). Make your app directory first, simlink gitignore, then create your app.

mkdir myapp
ln -s myapp/gitignore myapp/.gitignore
create-react-app myapp
0reactions
gaearoncommented, Jul 2, 2017

There isn’t anything we can do here. From the error message, it fails renaming a file. This is a disk permission problem. I don’t know how to fix permissions on this environment so please refer to its support resources.

Read more comments on GitHub >

github_iconTop Results From Across the Web

termux/termux - Gitter
I get $ npm install -g gitter-irc-bot Unhandled rejection Error: EACCES: permission ... link '/data/data/com.termux/files/home/.npm/_cacache/tmp/c2e85417' ...
Read more >
Android error: Trying to install express on termux
Simply downgrade your npm version to npm 6 by running this command in node: npm install -g npm@6. This will solve your issue...
Read more >
Resolving EACCES permissions errors when installing ...
Resolving EACCES permissions errors when installing packages globally · Reinstall npm with a node version manager · Manually change npm's default directory.
Read more >
Termux-setup-storage
You may get "Permission denied" error when trying to access shared storage, even though the permission has been granted. Workaround: Go to Android...
Read more >
Watchpack error when use npm run dev on next app - Reddit
Watchpack Error (watcher): Error: EACCES: permission denied, watch '/data/data' ... And this my PREFIX /data/data/com.termux/files/usr.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found