If you are reporting a bug, please fill in below. Otherwise feel free to remove this template entirely.
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
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
A react app is created.
An improperly initialized react app is created. npm run start fails.
Run these commands in the project folder and fill in their results:
npm ls react-scripts (if you haven鈥檛 ejected): node -v: 6.10.0
npm -v:4.4.1
Then, specify:
ChromeOS running Android's Termux
Chrome 57
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.
Can you run
sudo chown -R `whoami` /data/data/com.termux/files/home/
and then try again?
There's no sudo in Termux, but the user/group on home is the same as current user. Everything from /data/data/com.termux down is owned by u0_a78. /data/data is owned by system
If you have an android phone handy, you can reproduce it with that as well. I don't think it's chromeos specific.
I confirm that i have the same problem on android 7 with termux
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.
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
Most helpful comment
This is a late solution...
Due to Android's SELinux policies, you cannot hard link as non-root (which
create-react-appattempts to do).Make your app directory first, simlink gitignore, then create your app.