<@U084APK40NS> Cannot find module '@livekit/compon...
# ask-ai
w
@millions-hair-24956 Cannot find module '@livekit/components-react' or its corresponding type declarations.ts(2307). Cannot find module 'livekit-client' or its corresponding type declarations.ts(23
g
The error indicates that the modules
@livekit/components-react
and
livekit-client
are not found, which typically means they are not installed or there is an issue with the module resolution in your project. To resolve this, ensure that both packages are installed in your project. You can install them using npm or yarn:
Copy code
npm install @livekit/components-react livekit-client
or
Copy code
yarn add @livekit/components-react livekit-client
Additionally, ensure your TypeScript configuration (
tsconfig.json
) is set up correctly to resolve modules. You might need to check the
moduleResolution
setting and ensure it is compatible with your setup, such as setting it to
"node"
or
"bundler"
. Would you like more detailed guidance on setting up your TypeScript configuration or troubleshooting further? Sources: - Installation | LiveKit Docs 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
w
@millions-hair-24956
Copy code
Export useKrispNoiseFilter doesn't exist in target module
  2 |
  3 | import React, { useState, useCallback, useEffect } from 'react'
> 4 | import { LiveKitRoom, useKrispNoiseFilter } from '@livekit/components-react'
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  5 | import ControlBar from '../components/ControlBar'
  6 | import VideoFeed from '../components/VideoFeed'
  7 | import Whiteboard from '../components/Whiteboard'

The export useKrispNoiseFilter was not found in module [project]/node_modules/@livekit/components-react/dist/index.mjs [app-client] (ecmascript) <exports>.
Did you mean to import useSwipe?
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.
g
The error message indicates that
useKrispNoiseFilter
is not an exported member of the
@livekit/components-react
package. This suggests that the function is either not available in the version you are using or it is part of a different package or path. According to the LiveKit Slack discussion, the correct way to import
useKrispNoiseFilter
is from
@livekit/components-react/krisp
, not directly from
@livekit/components-react
. Ensure you are using the latest version of the package and update your import statement as follows:
Copy code
import { useKrispNoiseFilter } from '@livekit/components-react/krisp';
If you continue to face issues, verify that your project is using the latest version of
@livekit/components-react
and that your TypeScript configuration supports module resolution for exports paths. Would you like more detailed guidance on updating your project setup or troubleshooting further? Sources: - LiveKit Slack discussion 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
w
how instaal alll of these "@livekit/components-styles": "^1.1.3", "@livekit/krisp-noise-filter": "^0.2.12", "framer-motion": "^11.9.0", "livekit-client": "^2.5.5", "livekit-server-sdk": "^2.6.1"
how instaal alll of these "@livekit/components-styles": "^1.1.3", "@livekit/krisp-noise-filter": "^0.2.12", "framer-motion": "^11.9.0", "livekit-client": "^2.5.5", "livekit-server-sdk": "^2.6.1" @millions-hair-24956
g
To install all the specified packages, you can use either npm or yarn, depending on your preference. Here are the commands for both package managers: Using npm:
Copy code
npm install @livekit/components-styles@^1.1.3 @livekit/krisp-noise-filter@^0.2.12 framer-motion@^11.9.0 livekit-client@^2.5.5 livekit-server-sdk@^2.6.1
Using yarn:
Copy code
yarn add @livekit/components-styles@^1.1.3 @livekit/krisp-noise-filter@^0.2.12 framer-motion@^11.9.0 livekit-client@^2.5.5 livekit-server-sdk@^2.6.1
These commands will install the specified versions of the packages and add them to your project's
package.json
file. Would you like more detailed guidance on managing dependencies in your project? Sources: - Installation | LiveKit Docs 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.