bug: The "paths[2]" property must be of type string, got undefined #1587

Closed
opened 2026-02-16 17:31:40 -05:00 by yindo · 4 comments
Owner

Originally created by @HicaroD on GitHub (Sep 3, 2025).

Originally assigned to: @rekram1-node on GitHub.

Opencode crashes when I try to open it in a directory called vector-store-setup, I don't know what is so special about this directory, but I am assuming it is a bug in the OpenCode code itself. I tried with other directories, but they all work, except for this one.

Here is the full log file:

INFO  2025-09-03T14:56:43 +75ms service=default version=0.6.1 args=[] opencode
INFO  2025-09-03T14:56:43 +0ms service=project directory=/home/hicro/Documentos/Projects/Viventio/vector-store-setup fromDirectory
ERROR 2025-09-03T14:56:43 +11ms service=default name=TypeError message=The "paths[2]" property must be of type string, got undefined stack=TypeError: The "paths[2]" property must be of type string, got undefined
    at join (unknown)
    at write (/$bunfs/root/opencode:46131:32)
    at processTicksAndRejections (native:7:39) fatal

I've been using OpenCode for automating some boring work, I would like to contribute for the project if you guys understand it is a problem within the OpenCode, and not something I did wrong.

Originally created by @HicaroD on GitHub (Sep 3, 2025). Originally assigned to: @rekram1-node on GitHub. Opencode crashes when I try to open it in a directory called `vector-store-setup`, I don't know what is so special about this directory, but I am assuming it is a bug in the OpenCode code itself. I tried with other directories, but they all work, except for this one. Here is the full log file: ``` INFO 2025-09-03T14:56:43 +75ms service=default version=0.6.1 args=[] opencode INFO 2025-09-03T14:56:43 +0ms service=project directory=/home/hicro/Documentos/Projects/Viventio/vector-store-setup fromDirectory ERROR 2025-09-03T14:56:43 +11ms service=default name=TypeError message=The "paths[2]" property must be of type string, got undefined stack=TypeError: The "paths[2]" property must be of type string, got undefined at join (unknown) at write (/$bunfs/root/opencode:46131:32) at processTicksAndRejections (native:7:39) fatal ``` I've been using OpenCode for automating some boring work, I would like to contribute for the project if you guys understand it is a problem within the OpenCode, and not something I did wrong.
yindo closed this issue 2026-02-16 17:31:40 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 3, 2025):

This issue might be a duplicate of existing issues. Please check:

  • This appears to be the exact same issue as the current one (issue #2396 is showing up in search results, which shouldn't happen)

After reviewing the search results, this specific error pattern with "paths[2]" property must be of type string, got undefined" appears to be unique to this issue. However, there are several related path handling issues that might be relevant:

  • #787: PatchTool percent-encoded paths (file paths with spaces) trigger ENOENT - Similar path handling issues but with different error
  • #2307: tar not found - Path resolution issues in general
  • Various other issues mentioning TypeError and undefined path properties

This appears to be a genuine new bug where the path join operation is receiving undefined as the third parameter, likely in the write function at line 46131:32. The error specifically occurs in directories named "vector-store-setup" which suggests there may be a path parsing issue with hyphens or specific directory patterns.

Feel free to ignore if none of these address your specific case, as this does appear to be a unique path handling bug.

@github-actions[bot] commented on GitHub (Sep 3, 2025): This issue might be a duplicate of existing issues. Please check: - This appears to be the exact same issue as the current one (issue #2396 is showing up in search results, which shouldn't happen) After reviewing the search results, this specific error pattern with "paths[2]" property must be of type string, got undefined" appears to be unique to this issue. However, there are several related path handling issues that might be relevant: - #787: PatchTool percent-encoded paths (file paths with spaces) trigger ENOENT - Similar path handling issues but with different error - #2307: tar not found - Path resolution issues in general - Various other issues mentioning TypeError and undefined path properties This appears to be a genuine new bug where the path join operation is receiving undefined as the third parameter, likely in the write function at line 46131:32. The error specifically occurs in directories named "vector-store-setup" which suggests there may be a path parsing issue with hyphens or specific directory patterns. Feel free to ignore if none of these address your specific case, as this does appear to be a unique path handling bug.
Author
Owner

@rekram1-node commented on GitHub (Sep 3, 2025):

@HicaroD this was fixed, can you try upgrading to latest and trying again?

@rekram1-node commented on GitHub (Sep 3, 2025): @HicaroD this was fixed, can you try upgrading to latest and trying again?
Author
Owner

@HicaroD commented on GitHub (Sep 3, 2025):

that was quick!
now it works fine for version 0.6.4

@HicaroD commented on GitHub (Sep 3, 2025): that was quick! now it works fine for version 0.6.4
Author
Owner

@rekram1-node commented on GitHub (Sep 3, 2025):

awesome

@rekram1-node commented on GitHub (Sep 3, 2025): awesome
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1587