nstudio / nativescript-audio

:microphone: NativeScript plugin to record and play audio :musical_note:
Other
150 stars 104 forks source link

This master branch (9/17/18) is not working #122

Closed ihazar closed 3 years ago

ihazar commented 6 years ago

This master branch (9/17/18) is now working.

To recreate the error, you can run this:

git clone https://github.com/nstudio/nativescript-audio.git cd nativescript-audio/demo tns install npm install code . And update app/App_Resources/iOS/Info.plist with:

<key>NSMicrophoneUsageDescription</key>
<string>Recording Practice Sessions</string>

then run:

tns run ios

And you get this error:

JavaScript error: file:///app/main-view-model.js:3:35: JS ERROR Error: Could not find module 'nativescript-audio'. Computed path '/Users/ihazar/Library/Developer/CoreSimulator/Devices/1A798E3F-0895-4A56-803D-BDED5F2A10CF/data/Containers/Bundle/Application/E2F1F140-2FAF-458B-A69B-2F25B7BFD85C/demo.app/app/tns_modules/nativescript-audio'.

tns run android also fails.

About a week ago it worked nicely. Does anyone know how to make the demo work? Am I missing something?

Thanks,

bradmartin commented 6 years ago

looks like no transpiling of source code was executed.

This might help if you want to look at the scripts in src https://github.com/nstudio/nativescript-audio#demo-app

ihazar commented 6 years ago

I'm sorry, I'm new to this. Can you please shed more light on this?

bradmartin commented 6 years ago

Plugins source code is written in TypeScript which is not executable on any JS engine, to run TS code it needs to be transpiled to JS. So if you look at the plugin src directory there are several scripts in the package.json (of the plugin) which will handle this and prepare the demo project for running, which is what you were doing but you missed the transpiling of code so that's why you get the error about the missing module 😄

Hope that helps some 👍

cmckni3 commented 6 years ago

I am getting a build error for the iOS demo.

I ran:

cd nativescript-audio/src
npm i
npm run demo.ios

Error:

nativescript-audio/demo/platforms/ios/demo/build-debug.xcconfig:3: could not find included file '../plugins-debug.xcconfig' in search paths (in target 'demo')
nativescript-audio/demo/platforms/ios/demo/build-debug.xcconfig:3: could not find included file '../plugins-debug.xcconfig' in search paths (in target 'demo')
nativescript-audio/demo/platforms/ios/demo/build-debug.xcconfig:3: could not find included file '../plugins-debug.xcconfig' in search paths (in target 'demo')
** BUILD FAILED **