Skip to content

Adding warn about npx bug in getting-started #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions i18n/en-US/articles/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Create full-stack javascript applications within seconds using `npx` to generate

> 🔥 The minimum required [node.js](https://nodejs.org) version for development mode is *12.12.0*.

> ⚠ 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).

Replace `project-name` with your project name and run the command below to start a project:

```sh
Expand Down Expand Up @@ -89,6 +91,30 @@ This is the compiled result of your application in production mode.

>✨ Learn more about [how to deploy a Nullstack application](/how-to-deploy-a-nullstack-application).

## The known npx bug

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.

If this happens to you, our recommendations are:

- Using downloaded as you normally would with `npm`:
```sh
npm i -g create-nullstack-app
create-nullstack-app project-name
```

- 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):

- If you want to keep the use of space, replace `FirstName` with the one used on your path and run:
```sh
npm config set cache "C:\Users\FirstName~1\AppData\Roaming\npm-cache" --global
```

- or, using another path without spaces:
```sh
npm config set cache C:\tmp\nodejs\npm-cache --global
```

## Next step

⚔ Create your first [renderable component](/renderable-components).
26 changes: 26 additions & 0 deletions i18n/pt-BR/articles/comecando.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Crie aplicações javascript full-stack em segundos usando `npx` para gerar os a

> 🔥 A versão mínima necessária do [node.js](https://nodejs.org/pt-br/) para o modo de desenvovimento é *12.12.0*.

> ⚠ 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).

Troque `project-name` com o nome do seu projeto e rode o comanto abaixo para começar um projeto:

```sh
Expand Down Expand Up @@ -89,6 +91,30 @@ Este é o resultado compilado da sua aplicação em modo de produção.

>✨ Saiba mais sobre [como fazer deploy de aplicação Nullstack](/pt-br/como-fazer-deploy-de-aplicacao-nullstack).

## Bug conhecido do npx

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.

Se isso ocorrer com você, nossas recomendações são:

- Usando baixado como normalmente faria com `npm`:
```sh
npm i -g create-nullstack-app
create-nullstack-app project-name
```

- 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):

- Se deseja manter o uso do espaço, subtitua `PrimeiroNome` pelo usado no seu caminho e rode:
```sh
npm config set cache "C:\Users\PrimeiroNome~1\AppData\Roaming\npm-cache" --global
```

- ou, usando outro caminho sem espaços:
```sh
npm config set cache C:\tmp\nodejs\npm-cache --global
```

## Próximo Passo

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