Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

Custom Ionic Service and NPM

$
0
0

I’m trying to build a reusable service that I can publish to NPM. My custom service relies on Platform in @ionic/angular.

When I install my service locally into the ionic project it gives me and error that it cannot find the Platform module in the constructor.

Here is my package.json:

Here is my service:
image

Here is an example of how I’m utilizing it in the project:

import { IonWssService } from "ion-wss";

export class SomeComponent {
    constructor(private ionWss: IonWssService){}
}

I’ve published typescript packages many times but never an Angular package much less Ionic Angular.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>