Code Monkey home page Code Monkey logo

Comments (7)

zh4ngx avatar zh4ngx commented on September 18, 2024

Here is a snippet from my main.ts

import * as functions from "firebase-functions";
import {AccessToken} from "livekit-server-sdk";

const API_KEY = "---------------";
const SECRET_KEY = "------------------------";

export const createRoom = functions.https.onCall(async (data) => {
  const roomName = data.room;
  const participantName = data.user;

  const at = new AccessToken(API_KEY, SECRET_KEY, {
    identity: participantName,
  });
  at.addGrant({
    roomCreate: true,
    roomJoin: true,
    room: roomName,
    canPublish: true,
    canSubscribe: true,
  });

  const token = at.toJwt();
  console.log("access token", token);
  return token;
});

from node-sdks.

davidzhao avatar davidzhao commented on September 18, 2024

Another user reported this, and they had a workaround:

I tried excluding node_modules from our tsconfig, but that didn't seem to help. Only when I added skipLibCheck: true did the build work.
This was with LiveKit Server SDK v0.5.6 and TS v4.1.3

from node-sdks.

zh4ngx avatar zh4ngx commented on September 18, 2024

That makes total sense, and seems like the right thing to do in any case

from node-sdks.

davidzhao avatar davidzhao commented on September 18, 2024

reopening as others are also running into this. keeping it around to see if there's a better fix.

from node-sdks.

davidzhao avatar davidzhao commented on September 18, 2024

Another user reported seeing this with Node 14.

from node-sdks.

harrisonlo avatar harrisonlo commented on September 18, 2024

I'm seeing this in Node 20 without setting skipLibCheck to true.

from node-sdks.

oyvindholmstad avatar oyvindholmstad commented on September 18, 2024

@davidzhao Seems like this bug was reintroduced with a709384

from node-sdks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.