IBM / Train-Custom-Speech-Model

Create a custom Watson Speech to Text model using specialized domain data
https://developer.ibm.com/patterns/customize-and-continuously-train-your-own-watson-speech-service/
Apache License 2.0
59 stars 42 forks source link

npm run dev fails because of error TS2339 #93

Closed epitavy closed 3 years ago

epitavy commented 3 years ago

I follow the tutorial to run the application but il fails when I run npm run dev. I am a total newbie with NodeJs, so I'm a bit afraid to fix errors. I tried to run the application both on Linux and MacOS with node version 8 (like the configuration in the CI) and the latest LTS node version (14).

This is the error output
$ npm run dev

> train-custom-speech-model@0.1.0 dev /Users/me/Documents/deepdrone/Train-Custom-Speech-Model
> npm run build && concurrently --kill-others-on-fail "npm run start" "npm run client"

> train-custom-speech-model@0.1.0 build /Users/me/Documents/deepdrone/Train-Custom-Speech-Model
> npm run build-client && tsc

> train-custom-speech-model@0.1.0 build-client /Users/me/Documents/deepdrone/Train-Custom-Speech-Model
> cd client && npm install

audited 2098 packages in 10.646s

43 packages are looking for funding
  run `npm fund` for details

found 92 vulnerabilities (82 low, 2 moderate, 8 high)
  run `npm audit fix` to fix them, or `npm audit` for details
server/controllers/user.ts:42:36 - error TS2339: Property 'returnTo' does not exist on type 'Session & Partial'.

42       const returnTo = req.session.returnTo || '/';
                                      ~~~~~~~~

server/controllers/user.ts:43:26 - error TS2339: Property 'returnTo' does not exist on type 'Session & Partial'.

43       delete req.session.returnTo;
                            ~~~~~~~~

Found 2 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! train-custom-speech-model@0.1.0 build: `npm run build-client && tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the train-custom-speech-model@0.1.0 build 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!     /Users/me/.npm/_logs/2020-11-27T12_39_35_026Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! train-custom-speech-model@0.1.0 dev: `npm run build && concurrently --kill-others-on-fail "npm run start" "npm run client"`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the train-custom-speech-model@0.1.0 dev 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!     /Users/me/.npm/_logs/2020-11-27T12_39_35_054Z-debug.log

The error is about TypeScript. I wonder how the build in the CI can succeed when it fails on my computer.

$ nvm --version
0.37.1
$ npm --version
6.14.19
$ node --version
v8.17.0

Does someone has experienced the same issue ? And is there a fix to run the application and continue with the tutorial ?