Skip to content
This repository has been archived by the owner on Apr 7, 2021. It is now read-only.

[BUG] npx error caused by a single quote in username #31

Open
fbalhawan opened this issue Jan 13, 2020 · 2 comments
Open

[BUG] npx error caused by a single quote in username #31

fbalhawan opened this issue Jan 13, 2020 · 2 comments

Comments

@fbalhawan
Copy link

I'm trying to install react native, whenever I execute npx react-native init AwesomeProject
I get

`npm ERR! code ENOLOCAL
npm ERR! Could not install from "HP\AppData\Roaming\npm-cache_npx\2732" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Fouad's HP\AppData\Roaming\npm-cache_logs\2020-01-13T01_20_40_146Z-debug.log
Install for react-native@latest failed with code 1`

As you can see, my windows username is "Fouad's HP", and the error shows that it npm could not install from HP\AppData... instead of Fouad'sHP\AppData...

@edufranzoni
Copy link

edufranzoni commented Jan 13, 2020

this error occurs with me to, when i try to create a new angular workspace.

windows user profile name bug.

@fauzanelka
Copy link

fauzanelka commented Jan 20, 2020

Try this

  1. Run npm config edit
  2. Add these lines:
cache=C:\Users\Fouad's~1\AppData\Roaming\npm-cache
globalconfig=C:\Users\Fouad's~1\AppData\Roaming\npm\etc\npmrc
init-module=C:\Users\Fouad's~1\.npm-init.js
tmp=C:\Users\Fouad's~1\AppData\Local\Temp
userconfig=C:\Users\Fouad's~1\.npmrc
globalignorefile=C:\Users\Fouad's~1\AppData\Roaming\npm\etc\npmignore

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants