0

i've got this problem, i've installed almost everything what i could, android studio, jdk and things which were required for running android simulator

but when i'm trying to run: npx react-native@latest init MyAwesomeProject

it always shows: ✔ Downloading template ⠋ Copying template/home/bedena/.npm/_npx/dea611a43221eddd/node_modules/graceful-fs/polyfills.js:265 if (!chownErOk(er)) throw er ^

Error: ENOENT: no such file or directory, chmod '/home/bedena/Desktop/programming/nativereactbootcamp/MyAwesomeProjectInit/android/gradle.properties' at Object.chmodSync (node:fs:1991:3) at Object.chmodSync (/home/bedena/.npm/_npx/dea611a43221eddd/node_modules/graceful-fs/polyfills.js:263:21) at ReadStream. (/home/bedena/.npm/_npx/dea611a43221eddd/node_modules/@react-native-community/cli/build/tools/copyFiles.js:83:19) at ReadStream.emit (node:events:517:28) at emitCloseNT (node:internal/streams/destroy:132:10) at process.processTicksAndRejections (node:internal/process/task_queues:81:21) { errno: -2, syscall: 'chmod', code: 'ENOENT', path: '/home/bedena/Desktop/programming/nativereactbootcamp/MyAwesomeProjectInit/android/gradle.properties' }

it creates project folder, but files inside it are empty and scripts doesn't work

who knows what's happening?

1
  • I had the same problem. I solved the issue by downgrading my Node version from 18.x to 16.x. I think latest React Native version (0.72) has some issues with Node versions 18.x or higher. My current config is: Node: 16.20.2, NPM: 8.19.4, Yarn: not installed, Ubuntu: 22.04.3 Commented Oct 5, 2023 at 5:16

1 Answer 1

0

It might be related to your node version. As of today the same error happens with node v20, but after downgrading to v18 the issue is no longer there.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.