Quando vou fazer um agendamento e gravar em Storage. Detalhe, as vezes já caia por "npm ERR! code ELIFECYCLE" Mas neste caso, fechava e abria e ficava normal, agora toda vez que tenta gravar em Storage. E o codigo Ionic não dá erro nenhum e diz que gravou, vou em application e na database gravou e ate com enviado "true"
C:\Alura\Ionic 3\Parte1\aluracar-webservice>npm start
> api@1.0.0 start C:\Alura\Ionic 3\Parte1\aluracar-webservice
> node server.js
Servidor rodando em http://localhost:8080
Agendamento recebido: {"nomeCliente":"A","enderecoCliente":"B","emailCliente":"C
","modeloCarro":"C3 1.0","precoTotal":22000,"confirmado":false,"enviado":false}
C:\Alura\Ionic 3\Parte1\aluracar-webservice\api.js:67
const agendamentoId = agendamento.emailCliente + agendamento.data.substr
(0, 10);
^
TypeError: Cannot read property 'substr' of undefined
at enviaNotificacao (C:\Alura\Ionic 3\Parte1\aluracar-webservice\api.js:67:7
4)
at Timeout.setTimeout (C:\Alura\Ionic 3\Parte1\aluracar-webservice\api.js:46
:30)
at ontimeout (timers.js:386:11)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.12.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! api@1.0.0 start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the api@1.0.0 start script 'node server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the api package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs api
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls api
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Alura\Ionic 3\Parte1\aluracar-webservice\npm-debug.log
C:\Alura\Ionic 3\Parte1\aluracar-webservice>ionic info
[WARN] You are not in an Ionic project directory. Project context may be
missing.
cli packages: (C:\Users\Andre\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.16.0
ionic (Ionic CLI) : 3.16.0
System:
Node : v6.12.2
npm : 3.10.10
OS : Windows 7
Misc:
backend : pro