Skip to content

Commit 2cbd8d1

Browse files
authored
Merge pull request #83 from GuiDevloper/warning-npx-bug
Adding warn about npx bug in getting-started
2 parents 725283e + f586b20 commit 2cbd8d1

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

i18n/en-US/articles/getting-started.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Create full-stack javascript applications within seconds using `npx` to generate
99

1010
> 🔥 The minimum required [node.js](https://nodejs.org) version for development mode is *12.12.0*.
1111
12+
> ⚠ If the directory you are in contains spaces, you use Windows and `npx` gives errors, read about [the known npx bug](#the-known-npx-bug).
13+
1214
Replace `project-name` with your project name and run the command below to start a project:
1315

1416
```sh
@@ -89,6 +91,30 @@ This is the compiled result of your application in production mode.
8991
9092
>✨ Learn more about [how to deploy a Nullstack application](/how-to-deploy-a-nullstack-application).
9193
94+
## The known npx bug
95+
96+
Warned on `npx` issues like [#100](https://github.com/zkat/npx/issues/100), [#110](https://github.com/zkat/npx/issues/110) and [#143](https://github.com/zkat/npx/issues/146), it has an error when trying to resolve the path to his cache folder when contains spaces.
97+
98+
If this happens to you, our recommendations are:
99+
100+
- Using downloaded as you normally would with `npm`:
101+
```sh
102+
npm i -g create-nullstack-app
103+
create-nullstack-app project-name
104+
```
105+
106+
- or, change the cache folder directory, as stated [here](https://github.com/zkat/npx/issues/146#issuecomment-384016791) and [here](https://github.com/zkat/npx/issues/146#issuecomment-384019497):
107+
108+
- If you want to keep the use of space, replace `FirstName` with the one used on your path and run:
109+
```sh
110+
npm config set cache "C:\Users\FirstName~1\AppData\Roaming\npm-cache" --global
111+
```
112+
113+
- or, using another path without spaces:
114+
```sh
115+
npm config set cache C:\tmp\nodejs\npm-cache --global
116+
```
117+
92118
## Next step
93119

94120
⚔ Create your first [renderable component](/renderable-components).

i18n/pt-BR/articles/comecando.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Crie aplicações javascript full-stack em segundos usando `npx` para gerar os a
99

1010
> 🔥 A versão mínima necessária do [node.js](https://nodejs.org/pt-br/) para o modo de desenvovimento é *12.12.0*.
1111
12+
> ⚠ Se o diretório em que você está contém espaços, você usa Windows e o `npx` der erros, leia sobre o [bug conhecido do npx](#bug-conhecido-do-npx).
13+
1214
Troque `project-name` com o nome do seu projeto e rode o comanto abaixo para começar um projeto:
1315

1416
```sh
@@ -89,6 +91,30 @@ Este é o resultado compilado da sua aplicação em modo de produção.
8991
9092
>✨ Saiba mais sobre [como fazer deploy de aplicação Nullstack](/pt-br/como-fazer-deploy-de-aplicacao-nullstack).
9193
94+
## Bug conhecido do npx
95+
96+
Avisado em issues do `npx` como [#100](https://github.com/zkat/npx/issues/100), [#110](https://github.com/zkat/npx/issues/110) e [#143](https://github.com/zkat/npx/issues/146), ele tem um erro ao tentar resolver o caminho para sua pasta de cache quando este contém espaços.
97+
98+
Se isso ocorrer com você, nossas recomendações são:
99+
100+
- Usando baixado como normalmente faria com `npm`:
101+
```sh
102+
npm i -g create-nullstack-app
103+
create-nullstack-app project-name
104+
```
105+
106+
- ou, mudar o diretório da pasta de cache, como dito [aqui](https://github.com/zkat/npx/issues/146#issuecomment-384016791) e [aqui](https://github.com/zkat/npx/issues/146#issuecomment-384019497):
107+
108+
- Se deseja manter o uso do espaço, subtitua `PrimeiroNome` pelo usado no seu caminho e rode:
109+
```sh
110+
npm config set cache "C:\Users\PrimeiroNome~1\AppData\Roaming\npm-cache" --global
111+
```
112+
113+
- ou, usando outro caminho sem espaços:
114+
```sh
115+
npm config set cache C:\tmp\nodejs\npm-cache --global
116+
```
117+
92118
## Próximo Passo
93119

94120
⚔ Crie seu primeiro [componente renderizável](/pt-br/componentes-renderizaveis).

0 commit comments

Comments
 (0)