skip to Main Content

I try desperately to install react-native on my computer for 3 days, but it still doesn’t work…
I read a lot : docs, forums, but nothing worked for me.

I am a real beginner, I probably missed something obvious, but I can’t figure it out by myself.
This is why I am here, begging for help :/

I use WINDOWS 10

Here are my actions.

I followed instructions from : https://reactnative.dev/docs/environment-setup?guide=native

I installed Node JS : node-v18.16.1-x64.msi
I installed VS Code : VSCodeUserSetup-x64-1.80.1.exe
I installed Android Studio : android-studio-2022.2.1.20-windows.exe

With latest version :

  • Android SDK Platform 34
  • Android SDK Build-Tools 34 (build-tools;34.0.0)

I let the default Sdk path, even if my Windows user name is not ideal (space in it)
C:UsersA&T CORPETAppDataLocalAndroidSdk
(I first tried to install it on C:AndroidSdk, but it didn’t work either)

On Android Studio, I added the following Sdk/Tools:

  • Android SDK Build-Tools 33 (build-tools;33.0.0)
  • Google APIs Intel x86_64 Atom System Image (system-images;android-33;google_apis;x86_64)
  • Android SDK Platform 33 (platforms;android-33)
  • Sources for Android 33 (sources;android-33)
  • Android SDK Command-line Tools (latest) (cmdline-tools;latest)

I added the env : ANDROID_HOME = C:UsersA&T CORPETAppDataLocalAndroidSdk
And added %LOCALAPPDATA%AndroidSdkplatform-tools to Path
(I verified that LOCALAPPDATA = C:UsersA&T CORPETAppDataLocal)

I created a new empty folder : S:DocumentsPROGRAMMATIONMy_FirstProject
I dropped this folder into VSCode to create a new project

Now in VSCode Powershell, I run: npx react-native@latest init AwesomeProject

PS S:DocumentsPROGRAMMATIONMy_FirstProject> npx react-native@latest init AwesomeProject
npm notice
npm notice New minor version of npm available! 9.5.1 -> 9.8.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.8.1
npm notice Run npm install -g [email protected] to update!
npm notice
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path C:UsersA&T CORPETAppDataRoamingnpm
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, lstat 'C:UsersA&T CORPETAppDataRoamingnpm'
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:UsersA&T CORPETAppDataLocalnpm-cache_logs2023-07-20T16_34_40_894Z-debug-0.log

So I run the command in notice : npm install -g [email protected]

PS S:DocumentsPROGRAMMATIONMy_FirstProject> npm install -g [email protected]

added 1 package in 7s

28 packages are looking for funding
  run npm fund for details

Then I rerun the initial command : npx react-native@latest init AwesomeProject

PS S:DocumentsPROGRAMMATIONMy_FirstProject> npx react-native@latest init AwesomeProject
Need to install the following packages:
[email protected] to proceed? (y) y
npm WARN deprecated [email protected]: support for ECMAScript is superseded by uglify-js as of v3.13.0
'T' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
node:internal/modules/cjs/loader:1080
  throw err;
  ^

Error: Cannot find module 'C:[email protected]'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.16.1

I don’t now what to do.
Could it be related to my "A&T Corpet" user name ?
I wish I had created it without space and this &, but it is too late now, I have to deal with…

(I already uninstall / re-einstall everything, situation seems to be worse now)

If any of you has an idea, please let me know !
Thank you for reading me.

2

Answers


  1. Chosen as BEST ANSWER

    It definitely comes from my poor user name : "A&T Corpet" With simple windows cmd :

    C:Users>cd A&T Corpet
    Le chemin d’accès spécifié est introuvable.
    'T' n’est pas reconnu en tant que commande interne
    ou externe, un programme exécutable ou un fichier de commandes.
    

    Now the hard question : Is there a complete and safe way to change it without reinstall my whole computer from scratch ?

    I am so mad about me, having written such a bad username...


  2. Did you try running this command – npx react-native doctor. It will tell you if there is anything wrong with your installation.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search