Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

Maximum call stack size exceeded

antonio@antonio-desktop:~/Área de Trabalho/react$ npm install create-react-app
/home/antonio/Área de Trabalho/react
└─┬ create-react-app@2.1.8 
  ├─┬ chalk@1.1.3 
  │ ├── ansi-styles@2.2.1 
  │ ├── escape-string-regexp@1.0.5 
  │ ├─┬ has-ansi@2.0.0 
  │ │ └── ansi-regex@2.1.1 
  │ ├── strip-ansi@3.0.1 
  │ └── supports-color@2.0.0 
  ├── commander@2.18.0 
  ├─┬ cross-spawn@4.0.2 
  │ ├─┬ lru-cache@4.1.5 
  │ │ ├── pseudomap@1.0.2 
  │ │ └── yallist@2.1.2 
  │ └─┬ which@1.3.1 
  │   └── isexe@2.0.0 
  ├── envinfo@5.11.1 
  ├─┬ fs-extra@5.0.0 
  │ ├── graceful-fs@4.1.15 
  │ ├── jsonfile@4.0.0 
  │ └── universalify@0.1.2 
  ├─┬ hyperquest@2.1.3 
  │ ├── buffer-from@0.1.2 
  │ ├─┬ duplexer2@0.0.2 
  │ │ └─┬ readable-stream@1.1.14 
  │ │   ├── isarray@0.0.1 
  │ │   └── string_decoder@0.10.31 
  │ └─┬ through2@0.6.5 
  │   ├── readable-stream@1.0.34 
  │   └── xtend@4.0.1 
  ├── semver@5.5.1 
  ├─┬ tar-pack@3.4.1 
  │ ├─┬ debug@2.6.9 
  │ │ └── ms@2.0.0 
  │ ├─┬ fstream@1.0.11 
  │ │ ├── inherits@2.0.3 
  │ │ └─┬ mkdirp@0.5.1 
  │ │   └── minimist@0.0.8 
  │ ├─┬ fstream-ignore@1.0.5 
  │ │ └─┬ minimatch@3.0.4 
  │ │   └─┬ brace-expansion@1.1.11 
  │ │     ├── balanced-match@1.0.0 
  │ │     └── concat-map@0.0.1 
  │ ├─┬ once@1.4.0 
  │ │ └── wrappy@1.0.2 
  │ ├─┬ readable-stream@2.3.6 
  │ │ ├── core-util-is@1.0.2 
  │ │ ├── isarray@1.0.0 
  │ │ ├── process-nextick-args@2.0.0 
  │ │ ├── safe-buffer@5.1.2 
  │ │ ├── string_decoder@1.1.1 
  │ │ └── util-deprecate@1.0.2 
  │ ├─┬ rimraf@2.6.3 
  │ │ └─┬ glob@7.1.3 
  │ │   ├── fs.realpath@1.0.0 
  │ │   ├── inflight@1.0.6 
  │ │   └── path-is-absolute@1.0.1 
  │ ├─┬ tar@2.2.1 
  │ │ └── block-stream@0.0.9 
  │ └── uid-number@0.0.6 
  ├─┬ tmp@0.0.33 
  │ └── os-tmpdir@1.0.2 
  └─┬ validate-npm-package-name@3.0.0 
    └── builtins@1.0.3 

npm WARN enoent ENOENT: no such file or directory, open '/home/antonio/Área de Trabalho/react/package.json'
npm WARN react No description
npm WARN react No repository field.
npm WARN react No README data
npm WARN react No license field.
antonio@antonio-desktop:~/Área de Trabalho/react$ ./node_modules/.bin/create-react-app app
bash: ./node_modules/.bin/create-react-app: Arquivo ou diretório inexistente
antonio@antonio-desktop:~/Área de Trabalho/react$ create-react-app app

Creating a new React app in /home/antonio/Área de Trabalho/react/app.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

loadDep:yargs → mapToRegi ▐ ╢██████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine spdy@4.0.0: wanted: {"node":">=6.0.0","npm":">=6.0.0"} (current: {"nnpm ERR! Linux 4.15.0-47-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "--save" "--save-exact" "--loglevel" "error" "react" "react-dom" "react-scripts"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2

npm ERR! Maximum call stack size exceeded
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/antonio/Área de Trabalho/react/app/npm-debug.log

Aborting installation.
  npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.

Deleting generated file... node_modules
Deleting generated file... package.json
Done.
antonio@antonio-desktop:~/Área de Trabalho/react$ 

Já tentei reinstalar o npm e o nodejs mas deu mesmo erro

2 respostas

Fala aí Antonio, tudo bem? Parece que no sua pasta react não tem o package.json, talvez falou iniciar um projeto npm:

npm init -y

O -y vai dar yes para todas as perguntas.

Mas, eu sugiro você instalar o create-react-app de forma global na sua máquina:

npm i -g create-react-app

Dai você pode criar um projeto React com:

create-react-app meuProjeto

Espero ter ajudado.

solução!

Consegui, tive que fazer uma reinstalação do npm mais profunda: https://github.com/brock/node-reinstall

sugerido em: https://stackoverflow.com/questions/40566348/maximum-call-stack-size-exceeded-on-npm-install