using nativescript-audio is throwing can not find module error - mp3

I want to play mp3 in native script application. and I followed this introduction, https://www.npmjs.com/package/nativescript-audio to install nativescript-audo.
But when I run, I met this error:
file:///app/modules/rss_player/detail.component.js:7:35: JS ERROR Error: Could not find module 'nativescript-audio'
I used this first:
tns plugin add nativescript-audio
then
import { TNSPlayer } from 'nativescript-audio';
this._player = new TNSPlayer();
Can anyone tell me where is the error?
Do I have to import any special module? but which one?
The git for this plugin is:
https://github.com/bradmartin/nativescript-audio/tree/master/demo/app
Thanks

Related

how to resolve imports from shared package expo project in a monorepo

I have an import from a shared package of a typescript file inside my mobile package and currently using expo-yarn-workspaces;
import { ButtonStyles } from "#org/shared/components/button";
But then on running expo start --clear --web throws me an error
Module parse failed: Unexpected token (6:7)
You may need an appropriate loader to handle this file type.
| const ButtonTypes = tuple("outlined", "primary", "danger", "link");
Github issue merged here - https://github.com/expo/expo-cli/issues/1080
Due to some reason, we opted out the decision to use react-native itself. So, not tracking myself. Posting if someone finds it relevant for their work.

Ionic 2 module loading issue

I'm new to ionic 2 and still learning a bit and I have a problem.
I have a simple library written in JavaScript; I made a definition file for it in declrations.d.ts file in the src/ folder
Inside one of my typescript components I'm writing: import { myClass } from 'myLibiraryModule' and the compiler doesn't show any errors. However, when I save the file and the build process starts in ionic I get an error in the console: Uncaught Error: Cannot find module "myLibiraryModule"
Does anyone know what could be causing this?

JPype conflicts with django and raven

I am using jpype 0.6.1. I have written a python script to run some piece of code written in scala. Every thing is working as expected. But when I have integrated python script into my django project, I was getting some errors related to raven module.
Scala code to print message :
package com.test.auth
object Auth {
// returns the message passed as parameter
def printMessage(message: String) : String = {
message
}
}
Python script that accesses above code
import jpype
from jpype import *
classpath = '-Djava.class.path=/home/ec2-user/dt/jars/Auth.jar'
jpype.startJVM(jpype.getDefaultJVMPath(),classpath)
authPackage = JPackage('com.test.auth')
Auth = authPackage.Auth
msg = Auth.printMessage("Hello World")
print "message : ",msg
The above code is working fine. but after integrating into django project, I was getting following error
TypeError: Package com.test.auth.Auth.printMessage.__sentry__ is not
Callable 2016-08-16 07:56:08,850 [ERROR]
logger=sentry.errors.serializer process=14605 thread=140040558467072
Package com.test.auth.Auth.printMessage.__sentry__ is not Callable
I am new to django. I have read about the raven logging mechanism. but unable to find the issue.
Looking into this, we're just logging this and this should not interfere with Raven's normal reporting.
I had just the same problem. I manage fix this after putting on the Django project root folder the folder with all .class files that i was using.

Embedding python error Import by filename is not supported

I'm trying to embed python in to my application and have got stuck pretty early on.
I am embedding python into my C++ application and using the code found at this tutorial:
http://docs.python.org/2/extending/embedding.html#pure-embedding
My application matches entirely and compiles successfully no errors. However on running the application pModule = PyImport_Import(pName); line fails returning 0 meaning I get error output from PyErr_Print() of
Failed to load "C:\Users\workspace\dpllib\pyscript.py"
ImportError: Import by filename is not supported.
The application is being called with the commands C:\Users\workspace\ndnlib\pyscript.py multiply 50 150
I can't be sure, but I'm thinking that since pName is set to argv[1] and you're using the full path to call the script, then argv[1] is the full path. This means the code would try to import "C:\Users\workspace\dpllib\pyscript.py", which python can't (it can only import "pyscript").
Try running the script by just typing "pyscript.py" from within the directory and see if the error changes to 'Failed to load "pyscript.py"'. If it does, then you have to fix it so it doesn't just import argv[1] and modifies the string to get a module name instead of a file name.
It is simplier if you create your file as a module.
For instance,
create this:
<project>/MyModule/__init__.py
Then run your file <project>/script.py
dyn_module_name = (... get module name 'MyModule' from console arguments ...)
my_dynamic_module = __import__(dyn_module_name)
Since it would be a module, it will load while your scripy.py execution

Module unittest Kohana error, how to use?

I am trying times longer run it has several errors. Someone
has any tutorial or some way to make it work. Tested
several tutorials and I could not.
vlw staff
I already placed the php unittest unit in the directory.
the error is as follows:
Fatal error: main() [function.require]: Failed opening required
'PHPUnit/Util/Filter.php' (include_path='.;C:\php5\pear') in C:\wamp
\www\doeseulixo\branches\module_unittest\modules\unittest\PHPUnit
\Framework.php on line 0
See Installing PHPUnit.
PHPUnit should be installed with the 'pear' utility rather than downloaded manually. Kohana needs access to more than one class of the library.