SpeechToText-WebSockets-Javascript icon indicating copy to clipboard operation
SpeechToText-WebSockets-Javascript copied to clipboard

Cannot use typings on case-sensitive filesystems

Open peterkelly opened this issue 7 years ago • 0 comments

When building an app that uses the microsoft-speech-browser-sdk on a case-sensitive filesystem, such as those used on most Linux systems, the TypeScript compiler gives the following error:

app/chat/cordova-audio-source.ts(20,8): error TS7016: Could not find a declaration file for module 'microsoft-speech-browser-sdk'. '/build/mobile/node_modules/microsoft-speech-browser-sdk/distrib/Speech.Browser.Sdk.js' implicitly has an 'any' type.
  Try `npm install @types/microsoft-speech-browser-sdk` if it exists or add a new declaration (.d.ts) file containing `declare module 'microsoft-speech-browser-sdk';`

This happens because package.json contains the following:

"types": "distrib/speech.browser.sdk.d.ts",

when in fact the file is called Speech.Browser.Sdk.d.ts (note capitalisation differences).

The types field in package.json should be updated to use the correct case.

peterkelly avatar Mar 06 '18 08:03 peterkelly