React installation on Windows: Fixing npm ERR! enoent ENOENT

Note: This post is a details-post for the post: Learning web app development through free online tutorials – Organized Notes and Log, https://raviswdev.blogspot.com/2024/03/learning-web-app-development-through.html .

On running npx create-react-app first-project
Got error:
npm ERR! enoent ENOENT: no such file or directory, lstat ‘C:\Users\Ravi-user\AppData\Roaming\npm’

Solved it using info. from Node.js/Windows error: ENOENT, stat ‘C:\Users\RT\AppData\Roaming\npm’, https://stackoverflow.com/questions/25093276/node-js-windows-error-enoent-stat-c-users-rt-appdata-roaming-npm

Specificially I did the following:
Opened a command prompt as administrator
Created npm directory in C:\Users\Ravi-user\AppData\Roaming
Then changed directory in admin prompt command prompt to my React-Prog directory:
D:\Users\Ravi-user\vsc-source\ReactProg

Then ran npx create-react-app first-project
It asked for whether some packages should be installed. I entered yes.
It took perhaps 15 to 20 minutes to do all the packages (presumably download and) installation.
Then it gave a success message.

More details related to the above topic are provided here: Resolving npx create-react-app errors, https://ravisiyer.wordpress.com/2023/10/07/getting-exposed-to-current-web-development-platforms/#cra-errors

Comments

Archive