0

I wanted to make a react native app so I was following this video https://www.youtube.com/watch?v=I2UBjN5ER4s React Website Tutorial. I am primarily on windows I wanted my computer to accept commands just like Brian's. So I figured out a way https://www.youtube.com/watch?v=xzgwDbe7foQ Using Corry's method on installing the Ubuntu app I also installed a couple of things listed below and tried running the command npx create-react-app

added 1394 packages in 5m

213 packages are looking for funding
  run `npm fund` for details
node:internal/fs/utils:348
    throw err;
    ^

Error: EPERM: operation not permitted, copyfile '/mnt/c/Users/user/Visual Studio Code Projects/website/react-website/node_modules/cra-template/template/README.md' -> '/mnt/c/Users/user/Visual Studio Code Projects/website/react-website/README.md'
    at Object.copyFileSync (node:fs:2866:3)
    at copyFile (/mnt/c/Users/moham/Visual Studio Code Projects/website/react-website/node_modules/fs-extra/lib/copy/copy-sync.js:73:6)
    at onFile (/mnt/c/Users/moham/Visual Studio Code Projects/website/react-website/node_modules/fs-extra/lib/copy/copy-sync.js:59:25)
    at getStats (/mnt/c/Users/moham/Visual Studio Code Projects/website/react-website/node_modules/fs-extra/lib/copy/copy-sync.js:51:44)
    at startCopy (/mnt/c/Users/moham/Visual Studio Code Projects/website/react-website/node_modules/fs-extra/lib/copy/copy-sync.js:41:10)
    at copyDirItem (/mnt/c/Users/moham/Visual Studio Code Projects/website/react-website/node_modules/fs-extra/lib/copy/copy-sync.js:125:10)
    at /mnt/c/Users/moham/Visual Studio Code Projects/website/react-website/node_modules/fs-extra/lib/copy/copy-sync.js:118:39
    at Array.forEach (<anonymous>)
    at copyDir (/mnt/c/Users/moham/Visual Studio Code Projects/website/react-website/node_modules/fs-extra/lib/copy/copy-sync.js:118:23)
    at onDir (/mnt/c/Users/moham/Visual Studio Code Projects/website/react-website/node_modules/fs-extra/lib/copy/copy-sync.js:108:10) {
  errno: -1,
  syscall: 'copyfile',
  code: 'EPERM',
  path: '/mnt/c/Users/user/Visual Studio Code Projects/website/react-website/node_modules/cra-template/template/README.md',
  dest: '/mnt/c/Users/user/Visual Studio Code Projects/website/react-website/README.md'
}

Node.js v18.12.1

Aborting installation.
  node  has failed.

Deleting generated file... node_modules
Deleting generated file... package.json
Done.

I just wanted to execute commands just like Brian's through windows rather than purchasing a mac or etc.

I installed the js nodes and npm via command:

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &&\
sudo apt-get install -y nodejs

which I got from here: npm show "NPM ELF : not found error" in WSL

I also wanted to upvote or commented but since I "just" joined I couldn't.

thank you for any help I am going to remove everything start from scratch in the mean time

I also installed g -g++ something along those lines in order to get the npm working I am beginner just getting started.

Again thank you for reading and helping.

(If I figured it out I will update this post whenever possible)

If this helps out anybody else in the future cheers.

M.R
  • 1
  • 2

1 Answers1

0

Follow the mentioned steps

  1. Use the MSI installer from the nodejs download page

  2. Run the command mentioned below using CMD as administrator

npm install -g node-gyp
  1. Now run the react related commands

Note: The issue is that your terminal/cmd does not have write permission, hence the error.

Bharath
  • 390
  • 1
  • 6
  • Thank you for help now its asking where is node js installed Node.js v18.12.1 Could not determine Node.js install directory – M.R Nov 29 '22 at 01:17
  • node:net:397 err = this._handle.open(fd); ^ Error: EINVAL: invalid argument, uv_pipe_open at new Socket (node:net:397:24) at createWritableStdioStream (node:internal/bootstrap/switches/is_main_thread:78:18) at process.getStdout [as stdout] (node:internal/bootstrap/switches/is_main_thread:148:12) at console.get (node:internal/console/constructor:210:42) at console.value (node:internal/console/constructor:338:50) at console.log (node:internal/console/constructor:377:61) at evalScript (node:internal/process/execution:90:5) – M.R Nov 29 '22 at 01:20
  • Need to see some code related to the issue – Bharath Nov 30 '22 at 07:29
  • Hey update here ,I just used VS Code to make the react-project I was thinking of making thanks for the help. I also tried to install MAC OS via a VM using Oracle VM VirtualBox that didn't go so well either so – M.R Dec 08 '22 at 00:54
  • I guess a live session is required to see whats going on – Bharath Dec 08 '22 at 07:04