reactJS having issues creating my react app

please i’m having a problem creating my react app with npx create-react-app on my terminal
i’m getting this error please help
windows PowerShell
Copyright (C) 2016 Microsoft Corporation. Tous droits réservés.

PS C:\Users\ondo\Desktop\kalco> npx create-react-app ./
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path C:\Users\ondo\AppData\Roaming\npm
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, lstat ‘C:\Users\ondo\AppData\Roaming\npm’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ondo\AppData\Local\npm-cache_logs\2023-07-02T20_38_47_989Z-debug-0.log
PS C:\Users\ondo\Desktop\kalco>

Hello. The issue you have encountered is because of the following.

PS C:\Users\ondo\Desktop\kalco> npx create-react-app ./

Instead of a ./ , it is supposed to be the name of your application e.g my-app. What you provided was a special reserved symbol that represents the current directory.

The error looks to be related to it not finding npm in AppData\Roaming\npm

Did you install Node.js?

If you did, maybe try uninstalling and reinstalling it. You can also use nvm-windows


@a2937

./will use the name of the folder the command is executed in. You can also just use .

/test
npx create-react-app ./

package.json
{
 "name": "test"
}
1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.