Ainda não tem acesso? Estude com a gente! Matricule-se
Ainda não tem acesso? Estude com a gente! Matricule-se

Erro no "npm install isomorphic-fetch@2.2.1 --save"

Ola boa noite. Ao realizar o comando:

npm install isomorphic-fetch@2.2.1 --save

Me apareceu o seguinte erro:

C:\Users\Caio\Documents\curso\projeto-instalura-curso-aula1\projeto-instalura-ssr-codigo-ponto-partida>npm install isomorphic-fetch@2.2.1 --save

> farmhash@1.2.1 install C:\Users\Caio\Documents\curso\projeto-instalura-curso-aula1\projeto-instalura-ssr-codigo-ponto-partida\node_modules\farmhash
> node-gyp rebuild


C:\Users\Caio\Documents\curso\projeto-instalura-curso-aula1\projeto-instalura-ssr-codigo-ponto-partida\node_modules\farmhash>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\Caio\AppData\Local\Programs\Python\Python37-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Caio\Documents\curso\projeto-instalura-curso-aula1\projeto-instalura-ssr-codigo-ponto-partida\node_modules\farmhash
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN material-ui@0.16.7 requires a peer of react-tap-event-plugin@^1.0.0 || ^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: farmhash@1.2.1 (node_modules\farmhash):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: farmhash@1.2.1 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ isomorphic-fetch@2.2.1
updated 1 package and audited 29658 packages in 9.849s
found 62 vulnerabilities (27 low, 7 moderate, 26 high, 2 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

E não consigo entender, eu instalei o Python, mas não consigo entender o motivo desse erro, agradeço pela atenção, e tenham uma boa noite.

2 respostas

roda:

npm audit fix

Boa noite, ao rodar isso aconteceu

C:\Users\Caio\Documents\curso\projeto-instalura-curso-aula1\projeto-instalura-ssr-codigo-ponto-partida>npm audit fix
npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead

> farmhash@1.2.1 install C:\Users\Caio\Documents\curso\projeto-instalura-curso-aula1\projeto-instalura-ssr-codigo-ponto-partida\node_modules\farmhash
> node-gyp rebuild


C:\Users\Caio\Documents\curso\projeto-instalura-curso-aula1\projeto-instalura-ssr-codigo-ponto-partida\node_modules\farmhash>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\Caio\AppData\Local\Programs\Python\Python37-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Caio\Documents\curso\projeto-instalura-curso-aula1\projeto-instalura-ssr-codigo-ponto-partida\node_modules\farmhash
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

> yo@3.1.0 postinstall C:\Users\Caio\Documents\curso\projeto-instalura-curso-aula1\projeto-instalura-ssr-codigo-ponto-partida\node_modules\yo
> yodoctor


Yeoman Doctor
Running sanity checks on your system

√ No .bowerrc file in home directory
√ Global configuration file is valid
√ NODE_PATH matches the npm root
√ No .yo-rc.json file in home directory
√ Node.js version
√ npm version
√ yo version

Everything looks all right!
npm WARN material-ui@0.16.7 requires a peer of react-tap-event-plugin@^1.0.0 || ^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: farmhash@1.2.1 (node_modules\farmhash):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: farmhash@1.2.1 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ yo@3.1.0
added 1 package from 2 contributors, removed 2 packages and updated 7 packages in 37.687s
fixed 10 of 215 vulnerabilities in 29658 scanned packages
  35 vulnerabilities required manual review and could not be updated
  3 package updates for 170 vulns involved breaking changes
  (use `npm audit fix --force` to install breaking changes; or refer to `npm audit` for steps to fix these manually)

Porem quando usei o:" npm install isomorphic-fetch@2.2.1 --save " no diretório anterior

C:\Users\Caio\Documents\curso\projeto-instalura-curso-aula1>npm install isomorphic-fetch@2.2.1 --save
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\glob-watcher\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.0.14 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ isomorphic-fetch@2.2.1
updated 1 package and audited 24952 packages in 38.9s
found 206 vulnerabilities (17 low, 38 moderate, 150 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

Eu acho que instalou, e acredito que seja pq o projeto do GitHub esteja com alguma outra configuração que gera esse erro, se for isso posso ate encerrar esse tópico, so preciso que me confirme isso, por quero saber se o meu pc esta fazendo a instalação correta para futuros projetos.

Agradeço pela atenção e pela paciência.