EACCES error in Termux
See original GitHub issueIf 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:
npm ls react-scripts
(if you haven’t ejected):
react-scripts@0.9.5
node -v
:
6.10.0
npm -v
:
4.4.1
Then, specify:
- Operating system:
ChromeOS running Android’s Termux
- 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:
- Created 7 years ago
- Comments:6 (2 by maintainers)
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.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.