I was able to deploy a livekit agent to the liveki...
# cloud
w
I was able to deploy a livekit agent to the livekit cloud. Then I deleted that agent and tried to deploy another agent. It is giving an error now. Would you have any suggestions? --- Issue: "unable to determine project type" error when creating agent despite having all required files Hi team, I'm experiencing a persistent issue with lk agent create that seems to be a bug in the CLI v2.5.0. Background: - Was successfully deploying agents to LiveKit Cloud - Deleted an agent using lk agent delete - Since then, cannot create any new agents - always get "unable to determine project type" error Current Setup: $ lk --version lk version 2.5.0 $ ls -la -rw-rw-r-- 1 avneet avneet 431 Dockerfile -rw-rw-r-- 1 avneet avneet 1531 .env -rw-rw-r-- 1 avneet avneet 87 package.json -rw-rw-r-- 1 avneet avneet 76 requirements.txt drwxrwxr-x 2 avneet avneet 4096 src Error: $ lk agent create test-agent Using default project [confidophoneagent] Creating new agent Using secrets file [.env] unable to determine project type: project type could not be identified; expected package.json, requirements.txt, pyproject.toml, or lock files, please use a supported project type, or create your own Dockerfile in the current directory What I've tried: 1. Created fresh directory with only essential files 2. Tried with requirements.txt, pyproject.toml, package.json, Dockerfile - all present 3. Cleared CLI cache (rm ~/.livekit/cli-config.yaml) and re-authenticated 4. Deleted zombie agent that was showing with "---" version 5. Tried from multiple directories The error message says it expects these exact files, but they're all present in the directory. This started happening after deleting an agent. Deployment was working perfectly before that. Is this a known issue with v2.5.0? Any workarounds? Thanks! ---
r
@loud-breakfast-60455 or @echoing-kitchen-90064 any ideas on this one?
l
So you were able to deploy it successfully the first time but it won't deploy again for the same project?
w
yes
l
Let me try to reproduce the issue and get back to you.
w
thanks
l
cc @strong-dress-64642
s
upgrade to 2.5.1, we had some bugs in the initial release
w
ok
got it, thanks
s
if you still see issues, you can try with the
--skip-sdk-check
flag
w
got it, thanks!
👍 1
@strong-dress-64642 - Upgraded to 2.5.1 as suggested, but still getting the exact same error. Even with --skip-sdk-check flag: $ lk --version lk version 2.5.1 $ pwd /tmp/livekit-test-clean $ ls -la -rw-rw-r-- 1 avneet avneet 431 Dockerfile -rw-rw-r-- 1 avneet avneet 1531 .env -rw-rw-r-- 1 avneet avneet 87 package.json -rw-rw-r-- 1 avneet avneet 76 requirements.txt drwxrwxr-x 2 avneet avneet 4096 src -rw-rw-r-- 1 avneet avneet 3569 agent.py $ lk agent create test-agent --skip-sdk-check Using default project [confidophoneagent] Creating new agent Using secrets file [.env] unable to determine project type: project type could not be identified; expected package.json, requirements.txt, pyproject.toml, or lock files, please use a supported project type, or create your own Dockerfile in the current directory The bug persists in 2.5.1. I have: - ✅ requirements.txt - ✅ Dockerfile - ✅ package.json - ✅ agent.py - ✅ Fresh CLI auth - ✅ No livekit.toml All in the current directory, yet it says it can't find them. Is there a verbose/debug mode to see what the CLI is actually checking? Or another workaround? This started after deleting an agent - deployments worked perfectly before that.
s
Let me look into it. Sorry about that!
w
Thanks for your help Tobias!
r
Where did
package.json
come from? What is in there?
If you move that out of the dir does anything change?
s
and what version of
livekit-agents
are you using? i believe you may be seeing the wrong error, but the issue is actually that we attempt to validate the version of this package against the minimum SDK version officially supported by cloud deployed agents (
1.2.0
)
r
I am way out of my depth here. But I was wondering if it is this line: https://github.com/livekit/livekit-cli/blob/main/pkg/agentfs/utils.go#L104 Since
package.json
is there it will return
ProjectTypeNode
even though this is a python project. Then fails because these files are not there:
Copy code
nodeFiles := []string{
		"package.json",
		"package-lock.json",
		"yarn.lock",
		"pnpm-lock.yaml",
	}
🙌 1
👍 1
s
yeah, we'll need to collect all candidates and check each one
👍 1
r
@wide-lizard-38532 I was curious if you got this working my removing the package.json file
w
Thanks for checking in CWilson. That didn't work. I built a new agent from scratch. That i was able to deploy.
🤔 1