Closed lvargass closed 2 years ago
Did you try solution from this issue? https://github.com/peers/peerjs/issues/533
No, I still have the same problem.
On Wed, Aug 21, 2019 at 11:20 AM afrokick notifications@github.com wrote:
Did you try solution from this issue? #533 https://github.com/peers/peerjs/issues/533
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/peers/peerjs/issues/559?email_source=notifications&email_token=ACR6XUSKDKRTRJHFMVCCCRLQFVMKRA5CNFSM4IG5W4HKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD42A36Y#issuecomment-523505147, or mute the thread https://github.com/notifications/unsubscribe-auth/ACR6XUT4F5U27N4SC5EPWWTQFVMKRANCNFSM4IG5W4HA .
Your import line should be
import Peer from "peerjs"
I get a similar issue.
ERROR TypeError: peerjs__WEBPACK_IMPORTED_MODULE_0__ is not a constructor
@dunkfordyce: That gives me a compile error.
I solved it.
"./node_modules/peerjs/dist/peerjs.min.js"
to projects.THE_PROJECT.architect.build.options.scripts
..ts
file add below import
: declare var Peer:any;
ng serve
! I guess this is what have been missing all along.Should be fixed in peerjs@beta.0
good afternoon,
I am working on an application in ionic 4 with angular but I am having this error;
ERROR TypeError: peerjs_WEBPACK_IMPORTED_MODULE2 is not a constructor.
when I am trying to connect to the peerjs server, eg;
*import { Component } from '@angular/core'; import { PeerJSOption } from 'peerjs'; import as Peer from 'peerjs';
@Component({ selector: 'app-tab1', templateUrl: 'tab1.page.html', styleUrls: ['tab1.page.scss'] }) export class Tab1Page { protected peer: Peer;
constructor() { const coon: PeerJSOption = { host: 'localhost', port: 9000, path: '/myapp' }; this.peer = new Peer('person3', coon); console.log(this.peer); } }**
dependences "dependencies": { "@angular/common": "^7.2.2", "@angular/core": "^7.2.2", "@angular/forms": "^7.2.2", "@angular/http": "^7.2.2", "@angular/platform-browser": "^7.2.2", "@angular/platform-browser-dynamic": "^7.2.2", "@angular/router": "^7.2.2", "@ionic-native/core": "^5.0.0", "@ionic-native/splash-screen": "^5.0.0", "@ionic-native/status-bar": "^5.0.0", "@ionic/angular": "^4.1.0", "buffer": "^5.2.1", "core-js": "^2.5.4", "peerjs": "^1.0.2", "rxjs": "~6.5.1", "simple-peer": "^9.4.0", "tslib": "^1.9.0", "zone.js": "~0.8.29" },