EddyVerbruggen / nativescript-speech-recognition

:speech_balloon: Speech to text, using the awesome engines readily available on the device.
Other
90 stars 21 forks source link

Infinite "Cycle link found" #18

Closed liside closed 6 years ago

liside commented 6 years ago

Hi,

I am very new to nativescript. I wanted to try the demo before using this plugin but encountered "cycle link found" error as below. For reference, I tested on two machines (mac and ubuntu 16.04) but got the same error. Also, I am using latest node 8.x.

`npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN demo No description npm WARN demo No repository field. npm WARN demo No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 221 packages in 4.074s Copying template files... Installing tns-android ◝ Installing tns-android[..................] / rollbackFailedOptional: verb np ◞ Installing tns-android[..................] / rollbackFailedOptional: verb np ◡ Installing tns-android[..................] / rollbackFailedOptional: verb np ◟ Installing tns-android[..................] / rollbackFailedOptional: verb np ◜ Installing tns-android[..................] / rollbackFailedOptional: verb np ◠ Installing tns-android[..................] / rollbackFailedOptional: verb np ◝ Installing tns-android[..................] / rollbackFailedOptional: verb np ◞ Installing tns-android[..................] / rollbackFailedOptional: verb np ◡ Installing tns-android[..................] - loadIdealTree:loadAllDepsIntoId ◜ Installing tns-android[ ...............] | loadDep:negotiator: sill resolv ◠ Installing tns-android[ ............] | loadExtraneous: sill resolveWit ◝ Installing tns-android[ ............] \ diffTrees: sill install generat ◞ Installing tns-android[ ...........] - extract:tns-android: verb lock ◡ Installing tns-android[ .........] \ extract:nan: sill pacote nan@ht ◟ Installing tns-android[ .........] \ extract:nan: sill pacote nan@ht ◜ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◠ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◝ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◞ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◡ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◟ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◜ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◠ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◝ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◞ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◡ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◟ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◜ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◠ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◝ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◞ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◡ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◟ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◜ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◠ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◝ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◞ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◡ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◟ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◜ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◠ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◝ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◞ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◡ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◟ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◜ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◠ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◝ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◞ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◡ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◟ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◜ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◠ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◝ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◞ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◡ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◟ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◜ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◠ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◝ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◞ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◡ Installing tns-android[ ........] | extract:fsevents: sill pacote f ◟ Installing tns-android[ ......] \ finalize:tns-android: sill doSe ◜ Installing tns-android[ ......] | refresh-package-json:assert-plu ◠ Installing tns-android[ ......] / postinstall:tns-android: info l ◝ Installing tns-android[ ......] - postinstall: info lifecycle tns ◞ Installing tns-android[ ......] | postinstall: info lifecycle tns+ tns-android@3.1.1 added 1 package in 4.75s Project successfully created. Executing before-prepare hook from /home/side/Desktop/Workspace/nativescript-speech-recognition/demo/hooks/before-prepare/nativescript-dev-typescript.js Found peer TypeScript 2.3.4

5 private recognitionRequest: SFSpeechAudioBufferRecognitionRequest = null;


node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(5,31): error TS2304: Cannot find name 'SFSpeechAudioBufferRecognitionRequest'.

6   private audioEngine: AVAudioEngine = null;

node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(6,24): error TS2304: Cannot find name 'AVAudioEngine'.

7 private speechRecognizer: SFSpeechRecognizer = null;


node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(7,29): error TS2304: Cannot find name 'SFSpeechRecognizer'.

8   private recognitionTask: SFSpeechRecognitionTask = null;

node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(8,28): error TS2304: Cannot find name 'SFSpeechRecognitionTask'.

9 private inputNode: AVAudioInputNode = null;


node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(9,22): error TS2304: Cannot find name 'AVAudioInputNode'.

10   private audioSession: AVAudioSession = null;

node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(10,25): error TS2304: Cannot find name 'AVAudioSession'.

13 this.audioEngine = AVAudioEngine.new();


node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(13,24): error TS2304: Cannot find name 'AVAudioEngine'.

18       resolve(SFSpeechRecognizer.new().available);

node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(18,15): error TS2304: Cannot find name 'SFSpeechRecognizer'.

24 SFSpeechRecognizer.requestAuthorization((status: SFSpeechRecognizerAuthorizationStatus) => {


node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(24,7): error TS2304: Cannot find name 'SFSpeechRecognizer'.

24       SFSpeechRecognizer.requestAuthorization((status: SFSpeechRecognizerAuthorizationStatus) => {

node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(24,56): error TS2304: Cannot find name 'SFSpeechRecognizerAuthorizationStatus'.

25 if (status !== SFSpeechRecognizerAuthorizationStatus.Authorized) {


node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(25,24): error TS2304: Cannot find name 'SFSpeechRecognizerAuthorizationStatus'.

29         AVAudioSession.sharedInstance().requestRecordPermission((granted: boolean) => {

node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(29,9): error TS2304: Cannot find name 'AVAudioSession'.

39 let locale = NSLocale.alloc().initWithLocaleIdentifier(options.locale);


node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(39,22): error TS2304: Cannot find name 'NSLocale'.

40         this.speechRecognizer = SFSpeechRecognizer.alloc().initWithLocale(locale);

node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(40,33): error TS2304: Cannot find name 'SFSpeechRecognizer'.

42 this.speechRecognizer = SFSpeechRecognizer.new();


node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(42,33): error TS2304: Cannot find name 'SFSpeechRecognizer'.

55       SFSpeechRecognizer.requestAuthorization((status: SFSpeechRecognizerAuthorizationStatus) => {

node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(55,7): error TS2304: Cannot find name 'SFSpeechRecognizer'.

55 SFSpeechRecognizer.requestAuthorization((status: SFSpeechRecognizerAuthorizationStatus) => {


node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(55,56): error TS2304: Cannot find name 'SFSpeechRecognizerAuthorizationStatus'.

56         if (status !== SFSpeechRecognizerAuthorizationStatus.Authorized) {

node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(56,24): error TS2304: Cannot find name 'SFSpeechRecognizerAuthorizationStatus'.

61 this.audioSession = AVAudioSession.sharedInstance();


node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(61,29): error TS2304: Cannot find name 'AVAudioSession'.

62         this.audioSession.setCategoryError(AVAudioSessionCategoryRecord);

node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(62,44): error TS2304: Cannot find name 'AVAudioSessionCategoryRecord'.

63 this.audioSession.setModeError(AVAudioSessionModeMeasurement);


node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(63,40): error TS2304: Cannot find name 'AVAudioSessionModeMeasurement'.

64         this.audioSession.setActiveWithOptionsError(true, AVAudioSessionSetActiveOptions.NotifyOthersOnDeactivation);

node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(64,59): error TS2304: Cannot find name 'AVAudioSessionSetActiveOptions'.

66 this.recognitionRequest = SFSpeechAudioBufferRecognitionRequest.new();


node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(66,35): error TS2304: Cannot find name 'SFSpeechAudioBufferRecognitionRequest'.

82             (result: SFSpeechRecognitionResult, error: NSError) => {

node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(82,22): error TS2304: Cannot find name 'SFSpeechRecognitionResult'.

82 (result: SFSpeechRecognitionResult, error: NSError) => {


node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(82,56): error TS2304: Cannot find name 'NSError'.

93                 this.audioSession.setCategoryError(AVAudioSessionCategoryPlayback);

node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(93,52): error TS2304: Cannot find name 'AVAudioSessionCategoryPlayback'.

94 this.audioSession.setModeError(AVAudioSessionModeDefault);


node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(94,48): error TS2304: Cannot find name 'AVAudioSessionModeDefault'.

107         this.inputNode.installTapOnBusBufferSizeFormatBlock(0, 1024, recordingFormat, (buffer: AVAudioPCMBuffer, when: AVAudioTime) => {

node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(107,96): error TS2304: Cannot find name 'AVAudioPCMBuffer'.

107 this.inputNode.installTapOnBusBufferSizeFormatBlock(0, 1024, recordingFormat, (buffer: AVAudioPCMBuffer, when: AVAudioTime) => {


node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(107,120): error TS2304: Cannot find name 'AVAudioTime'.

126       this.audioSession.setCategoryError(AVAudioSessionCategoryPlayback);

node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(126,42): error TS2304: Cannot find name 'AVAudioSessionCategoryPlayback'.

127 this.audioSession.setModeError(AVAudioSessionModeDefault);



node_modules/nativescript-speech-recognition/speech-recognition.ios.ts(127,38): error TS2304: Cannot find name 'AVAudioSessionModeDefault'.

Preparing project...
Cycle link found.
Cycle link found.
Cycle link found.
Cycle link found.
Cycle link found.
Cycle link found.
Cycle link found.
Cycle link found.
Cycle link found.
Cycle link found.
Cycle link found.
Cycle link found.
Cycle link found.`
datanotion commented 6 years ago

I fixed this by deleting: node_modules, platform, package-lock.json and then rebuilding.