arielfaur / ionic-audio

An audio player for Ionic 3 and Angular 4. Works with HTML 5 audio or native audio using Cordova Media plugin.
http://arielfaur.github.io/ionic-audio/2.0/index.html
MIT License
321 stars 163 forks source link

Rollup Script failed to locate ionic-audio #96

Closed sfaizanh closed 7 years ago

sfaizanh commented 7 years ago

Hi @arielfaur I was stuck in running/build application due to this error

rollup failed: Could not resolve 'ionic-audio/dist' from 
    /Users/faizanhasan/Documents/Projects/app/src/app/app.module.ts 

Found Solution Edited module config file node_modules/ionic-audio/package.json changed these lines

"main": "./dist/index.ts"

import { AudioProvider } from 'ionic-audio' in app.modules.ts

Haven't tested on real device yet!

Ionic Info Ionic : 2.0.1 @ionic/app-scripts : 1.1.3

Request Second thing can you include tsconfig.json file in node_modules/ionic-audio/

Thanks

sfaizanh commented 7 years ago

Hi @arielfaur i have added a pull request(#97) for typescript config. There is no need of `"files": ["node_modules/ionic-audio/dist/index.ts" ] in tsconfig.json file

There is an issue with prepublish or build so i was unable to test it properly, when i install npm from github repository. if prepublish does not work with the npm install ionic-audio then replace prepublish in package.json file with

"build": "npm run build:ts",
"build:ts": "tsc -p tsconfig.json",

it should work