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

Issue with bundling mediasoup package: An unhandled Rollup error occurred #517

Open
Akshit1311 opened this issue Feb 20, 2023 · 0 comments

Comments

@Akshit1311
Copy link

Error:
image

Cause:
using mediasoup Device seems to be causing the issue.
image
image

Description:
When mediasoup is directly installed in a frontend nextjs app mediasoup.Device() is working but not working for the frontend pkg which is built using preconstruct, the build fails as in the above screenshot.

tsconfig:

{
  "compilerOptions": {
    "lib": ["es2017", "dom"],
    "isolatedModules": true,
    "esModuleInterop": true
  }
}

package.json

{
  "name": "web-core",
  "version": "1.0.0",
  "description": "",
  "main": "dist/web-core.cjs.js",
  "module": "dist/web-core.esm.js",
  "umd:main": "dist/web-core.umd.min.js",
  "scripts": {
    "fix": "pnpm preconstruct fix",
    "build": "pnpm preconstruct build",
    "watch": "pnpm preconstruct watch"
  },
  "keywords": [
    "huddle01",
    "web3"
  ],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@babel/core": "^7.20.12",
    "@babel/preset-env": "^7.20.2",
    "@babel/preset-typescript": "^7.18.6",
    "@preconstruct/cli": "^2.3.0",
    "eslint-config-custom": "workspace:*",
    "types": "workspace:*",
    "typescript": "^4.9.5"
  },
  "preconstruct": {
    "umdName": "HuddleWebClient"
  },
  "dependencies": {
    "axios": "^1.3.3",
    "mediasoup-client": "^3.6.80",
    "nanoid": "^3.3.4",
    "socket.io-client": "^4.6.0"
  }
}
{
  "name": "web-core",
  "version": "1.0.0",
  "description": "",
  "main": "dist/web-core.cjs.js",
  "module": "dist/web-core.esm.js",
  "umd:main": "dist/web-core.umd.min.js",
  "scripts": {
    "fix": "pnpm preconstruct fix",
    "build": "pnpm preconstruct build",
    "watch": "pnpm preconstruct watch"
  },
  "keywords": [
    "huddle01",
    "web3"
  ],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@babel/core": "^7.20.12",
    "@babel/preset-env": "^7.20.2",
    "@babel/preset-typescript": "^7.18.6",
    "@preconstruct/cli": "^2.3.0",
    "eslint-config-custom": "workspace:*",
    "types": "workspace:*",
    "typescript": "^4.9.5"
  },
  "preconstruct": {
    "umdName": "HuddleWebClient"
  },
  "dependencies": {
    "axios": "^1.3.3",
    "mediasoup-client": "^3.6.80",
    "nanoid": "^3.3.4",
    "socket.io-client": "^4.6.0"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant