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

Error : (intermediate value)(intermediate value)(intermediate value) is not a constructor #1063

Open
erdemoden opened this issue Mar 29, 2023 · 1 comment
Labels
client related to peerjs client

Comments

@erdemoden
Copy link

erdemoden commented Mar 29, 2023

I want to make a game using cocos creator I Installed peerjs and I write bellow code :

import { _decorator, Component, Node } from 'cc';
import Peer from 'peerjs';
const { ccclass, property } = _decorator;

@ccclass('deneme')
export class deneme extends Component {
    start() {
        const peer = new Peer();
        peer.on("open",(id)=>{
            console.log(id);
        });
    }

    update(deltaTime: number) {
        
    }
}

but when I run my game it gaves error : [Preview] (intermediate value)(intermediate value)(intermediate value) is not a constructor
how can I solve it please help me

@jonasgloning
Copy link
Member

I'm sorry to hear that @erdemoden. Is this still happening with the latest PeerJS version?

@irgalamarr irgalamarr added the client related to peerjs client label Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client related to peerjs client
Projects
None yet
Development

No branches or pull requests

3 participants