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

Erro ao compilar persiste

Bom dia, Ao rodar o comando "npm run compile" já com o configts.json configurado ocorre o seguinte erro:

C:\Users\erivanjunior\Downloads\ProjetosAluraBaixados\Javascript\alurabank>npm run compile

> alurabank@1.0.0 compile C:\Users\erivanjunior\Downloads\ProjetosAluraBaixados\Javascript\alurabank
> tsc

app/ts/testeApp.ts(4,23): error TS2346: Supplied parameters do not match any signature of call target.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! alurabank@1.0.0 compile: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the alurabank@1.0.0 compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\erivanjunior\AppData\Roaming\npm-cache\_logs\2019-09-24T14_05_28_126Z-debug.log
3 respostas

Olá Erivan!

Tenta me mandar o log aqui por favor, você encontra o arquivo no seguinte caminho:

C:\Users\erivanjunior\AppData\Roaming\npm-cache\_logs\2019-09-24T14_05_28_126Z-debug.log

Gostaria de dar uma olhada nele para tentar entender o que aconteceu.

Aguardo seu retorno!

Segue o log:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'compile'
1 verbose cli ]
2 info using npm@6.10.3
3 info using node@v12.10.0
4 verbose run-script [ 'precompile', 'compile', 'postcompile' ]
5 info lifecycle alurabank@1.0.0~precompile: alurabank@1.0.0
6 info lifecycle alurabank@1.0.0~compile: alurabank@1.0.0
7 verbose lifecycle alurabank@1.0.0~compile: unsafe-perm in lifecycle true
8 verbose lifecycle alurabank@1.0.0~compile: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\erivanjunior\Downloads\ProjetosAluraBaixados\Javascript\alurabank\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\erivanjunior\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Java\jdk1.8.0_221\bin;C:\Program Files\Java\jre1.8.0_221\bin;C:\Users\erivanjunior\Downloads\Softwares\apache-maven-3.6.2\bin;C:\Users\erivanjunior\AppData\Roaming\npm;C:\Users\erivanjunior\AppData\Local\Programs\Microsoft VS Code\bin
9 verbose lifecycle alurabank@1.0.0~compile: CWD: C:\Users\erivanjunior\Downloads\ProjetosAluraBaixados\Javascript\alurabank
10 silly lifecycle alurabank@1.0.0~compile: Args: [ '/d /s /c', 'tsc' ]
11 silly lifecycle alurabank@1.0.0~compile: Returned: code: 2  signal: null
12 info lifecycle alurabank@1.0.0~compile: Failed to exec compile script
13 verbose stack Error: alurabank@1.0.0 compile: `tsc`
13 verbose stack Exit status 2
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:326:16)
13 verbose stack     at EventEmitter.emit (events.js:209:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:209:13)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid alurabank@1.0.0
15 verbose cwd C:\Users\erivanjunior\Downloads\ProjetosAluraBaixados\Javascript\alurabank
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "compile"
18 verbose node v12.10.0
19 verbose npm  v6.10.3
20 error code ELIFECYCLE
21 error errno 2
22 error alurabank@1.0.0 compile: `tsc`
22 error Exit status 2
23 error Failed at the alurabank@1.0.0 compile script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
solução!

só dar um

npm install typescript@2.3.2 --save-dev

e rodar

npm rum compile