Hi all
I am trying to use
janus.js in a React+Webpack+Typescript (create-react-app).
However, I am not able to import.
I have a
git repo which minimally reproduces the problem (as minimal as you can get with create-react-app eject, anyways...).
Using import { Janus } from 'janus-gateway'; I get
yarn run v1.22.19
$ node scripts/build.js
Creating an optimized production build...
Failed to compile.
TS2724: '"janus-gateway"' has no exported member named 'Janus'. Did you mean 'JanusJS'?
2 | import logo from './logo.svg';
3 | import './App.css';
> 4 | import { Janus } from 'janus-gateway';
| ^^^^^
5 |
6 | function App() {
7 | console.log(Janus)
error Command failed with exit code 1.
info Visit
https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I also tried importing JanusJS instead (which is declared in the .d.ts file), but to no avail (
commit).
Does anyone have a working setup for this?
Best
Jonathan