Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NativeAudio import error? #104

Open
JACKZGGG opened this issue Jun 26, 2024 · 3 comments
Open

NativeAudio import error? #104

JACKZGGG opened this issue Jun 26, 2024 · 3 comments
Labels
question Further information is requested

Comments

@JACKZGGG
Copy link

After downloading, I tried importing {NativeAudio} from '@ capacitor community/native audio', but found an error
Can anyone help me
zzz

@JACKZGGG
Copy link
Author

After comparing node.modules, it seems that the path of the package is incorrect?
Uploading qg3XpyvA5s.jpg…

@jcesarmobile
Copy link
Contributor

can you provide a sample app, I can't reproduce

@jcesarmobile jcesarmobile added the question Further information is requested label Jun 28, 2024
@tylervz
Copy link

tylervz commented Jul 10, 2024

I'm getting a similar error with my Capacitor app when trying to upgrade @capacitor-community/native-audio from version 5.0.1 to version 6.0.0 (I'm also upgrading my app from Capacitor 5.5.1 to 6.0.0 as well). I believe the issue is stemming from the lack of a dist directory in node_modules/@capacitor-community/native-audio.

I'm using node v20.12.2 and npm v10.5.0 .

When I install @capacitor-community/native-audio version 5.0.1 in my app, then the node_modules/@capacitor-community/native-audio/dist directory exists and contains the following files:

  • docs.json
  • esm (this is a directory, actually)
  • plugin.cjs.js
  • plugin.cjs.js.map
  • plugin.js
  • plugin.js.map

However, when I install @capacitor-community/native-audio version 6.0.0, then there is no dist directory in node_modules/@capacitor-community/native-audio.

Screenshot 2024-07-10 at 3 00 55 PM

My app is using a library that copies npm packages to be used with OpenUI5 framework when declared as dependencies in a UI5 controller. I think the library is expecting a node_modules/@capacitor-community/native-audio/dist/plugin.js file because it's listed as the main file in package.json:

"main": "dist/plugin.js",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants