<https://github.com/livekit-examples/agent-starter...
# ask-ai
l
https://github.com/livekit-examples/agent-starter-embed In this repo I am following the README and trying to run the frontend on localhost, but repeatedly getting this error: Module not found: Can't resolve '@radix-ui/react-dismissable-layer' even after seperately installing them, How to fix it
t
Thanks for reaching out, Munim. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Could you kindly confirm if the repository you're using is a specific fork, or if you were referring to 'agent-starter-react' or another well-known LiveKit example? This will really help me make sure the solution fits perfectly with your project setup. Sources: web/pnpm-lock.yaml | pnpm-lock.yaml | client/pnpm-lock.yaml | complex-agents/drive-thru/frontend/pnpm-lock.yaml | frontend/package-lock.json
l
yes livekit example agent-starter-embed
t
The repository agent-starter-embed is confirmed to exist and is part of the LiveKit example applications. To help you resolve the error "Module not found: Can't resolve '@radix-ui/react-dismissable-layer'", let's walk through a few steps together: 1. Verify Installation: First, please check if the package is listed in your
package.json
. If it’s not there, you can add it by running:
pnpm add @radix-ui/react-dismissable-layer
2. Check Package Manager and Lockfile: Since LiveKit projects use
pnpm
, make sure your
pnpm-lock.yaml
is up to date and resolving correctly. 3. Install Peer Dependencies: It’s important that your React and React DOM versions are compatible. If any peer dependencies are missing, you can install them with:
pnpm add react react-dom
4. Clear Cache and Reinstall: Sometimes, lockfile inconsistencies can cause issues. You can try forcing a clean install by running: `pnpm install --force`or
Copy code
pnpm cache clean
pnpm install
5. Verify Import Syntax: Double-check that you’re importing the module correctly:
import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
6. Review Your Project’s Dependencies: Lastly, please ensure you’re working from the correct repository and that all dependencies have been properly installed. If you’re still running into trouble after these steps, don’t hesitate to reach out. I’m here to help you get this sorted! Sources: web/pnpm-lock.yaml | frontend/package-lock.json | web/pnpm-lock.yaml | Example Applications | livekit/livekit_composite | DeepWiki | pnpm-lock.yaml
l
Can i use npm instead?
t
While it’s definitely possible to use npm instead of pnpm, I want to gently share that LiveKit projects, including the agent-starter-embed repository, are really optimized to work with pnpm. Using npm might sometimes cause dependency resolution hiccups or inconsistencies since pnpm handles monorepos and shared dependencies in its own special way. If you’d still like to go ahead with npm, here’s a friendly step-by-step guide to help you along: 1. Install Dependencies: Start by running this command to get all your dependencies set up:
npm install
2. Install Missing Packages: If you run into errors, you can manually add any missing packages like this:
npm install @radix-ui/react-dismissable-layer
3. Check Peer Dependencies: Make sure your React and React DOM versions are compatible by running:
npm install react react-dom
4. Clear Cache and Reinstall: If things still aren’t quite right, try clearing the npm cache and reinstalling everything:
Copy code
npm cache clean --force
rm -rf node_modules package-lock.json
npm install
That said, for the smoothest experience and to avoid any unexpected troubles, I warmly recommend sticking with pnpm as it’s what LiveKit projects are designed around. I’m here if you need any more help!