project_video_chat icon indicating copy to clipboard operation
project_video_chat copied to clipboard

call user function not working

Open aynuayex opened this issue 6 months ago • 0 comments

I have followed your video and coded along and also checked this repo but I'm having the below error when I click the call button

simple-peer.js?v=59db85ac:4087 Uncaught 
TypeError: Cannot read properties of undefined (reading 'call')
    at _Peer.Readable (simple-peer.js?v=59db85ac:4087:14)
    at new Duplex (simple-peer.js?v=59db85ac:3405:16)
    at new _Peer (simple-peer.js?v=59db85ac:5021:9)
    at callUser (SocketContext.jsx:61:28)
    at onClick (Options.jsx:86:102)
    at HTMLUnknownElement.callCallback2 (chunk-6VWAHX6D.js?v=59db85ac:3674:22)
    at Object.invokeGuardedCallbackDev (chunk-6VWAHX6D.js?v=59db85ac:3699:24)
    at invokeGuardedCallback (chunk-6VWAHX6D.js?v=59db85ac:3733:39)
    at invokeGuardedCallbackAndCatchFirstError (chunk-6VWAHX6D.js?v=59db85ac:3736:33)
    at executeDispatch (chunk-6VWAHX6D.js?v=59db85ac:7014:11)

have tried to clone your project to run it locally but also having issues with the npm installation like show below

Node.js v20.9.0
PS C:\Users\user\Desktop\freecodecamp\Youtube\JavaScript mastery\test\client> npm start

> [email protected] start
> react-scripts start

node:internal/modules/cjs/loader:423
      throw err;
      ^

Error: Cannot find module 'C:\Users\user\Desktop\freecodecamp\Youtube\JavaScript mastery\test\client\node_modules\isexe\index.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:415:19)
    at Module._findPath (node:internal/modules/cjs/loader:665:18)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1034:27)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (C:\Users\user\Desktop\freecodecamp\Youtube\JavaScript mastery\test\client\node_modules\react-dev-utils\node_modules\which\which.js:7:15)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32) {
  code: 'MODULE_NOT_FOUND',
  path: 'C:\\Users\\user\\Desktop\\freecodecamp\\Youtube\\JavaScript mastery\\test\\client\\node_modules\\isexe\\package.json',
  requestPath: 'isexe'
}


aynuayex avatar Aug 16 '24 12:08 aynuayex