[Build Fail] Cannot find module '../../validators/validate.js' #4677

Open
opened 2026-02-16 17:45:00 -05:00 by yindo · 4 comments
Owner

Originally created by @agamsingh9 on GitHub (Jan 10, 2026).

Originally assigned to: @thdxr on GitHub.

Description

Following CONTRIBUTING.md, I get the following error running bun dev or ./packages/opencode/script/build.ts --single

error: Cannot find module '../../validators/validate.js' from '/home/agam/git/opencode/node_modules/.bun/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/generated/lowercase.js'

Please offer guidance. I've been stuck for a while trying to install opencode.

Plugins

No response

OpenCode version

origin/dev

Steps to reproduce

[I] agam@dev ~/g/opencode (dev)> git show --name-only
commit f882cca98a2b245b695880499dfc4101d4ed924c (HEAD -> dev, origin/dev, origin/HEAD)
Author: Jérôme Benoit <jerome.benoit@piment-noir.org>
Date:   Sat Jan 10 22:26:24 2026 +0100

    fix(desktop): add missing StoreExt import and fix unused mut warning (#7707)

packages/desktop/src-tauri/src/lib.rs
[I] agam@dev ~/g/opencode (dev)> sudo pacman -S bun
resolving dependencies...
looking for conflicting packages...

Packages (1) bun-1.3.5-2

Total Installed Size:  62.07 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                                                        [#################################################] 100%
(1/1) checking package integrity                                                      [#################################################] 100%
(1/1) loading package files                                                           [#################################################] 100%
(1/1) checking for file conflicts                                                     [#################################################] 100%
(1/1) checking available disk space                                                   [#################################################] 100%
:: Processing package changes...
(1/1) installing bun                                                                  [#################################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[I] agam@dev ~/g/opencode (dev)> bun install
bun install v1.3.5-canary.1 (fa5a5bbe)

$ husky

+ @actions/artifact@5.0.1 (v5.0.2 available)
+ @tsconfig/bun@1.0.9 (v1.0.10 available)
+ husky@9.1.7
+ prettier@3.6.2
+ sst@3.17.23
+ turbo@2.5.6
+ @aws-sdk/client-s3@3.933.0
+ typescript@5.8.2 (v5.9.3 available)

3548 packages installed [152.35s]
[I] agam@dev ~/g/opencode (dev)> bun dev

$ bun run --cwd packages/opencode --conditions=browser src/index.ts
error: Cannot find module '../../validators/validate.js' from '/home/agam/git/opencode/node_modules/.bun/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/generated/lowercase.js'

Bun v1.3.5-canary.1+fa5a5bbe5 (Linux x64)
error: script "dev" exited with code 1
[I] agam@dev ~/g/opencode (dev) [1]> ./packages/opencode/script/build.ts --single
error: Cannot find module '../../validators/validate.js' from '/home/agam/git/opencode/node_modules/.bun/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/generated/lowercase.js'

Bun v1.3.5-canary.1+fa5a5bbe5 (Linux x64)
[I] agam@dev ~/g/opencode (dev) [1]> sudo rm -rf ~/.bun
                                     sudo pacman -Rns bun

checking dependencies...

Packages (1) bun-1.3.5-2

Total Removed Size:  62.07 MiB

:: Do you want to remove these packages? [Y/n]
:: Processing package changes...
(1/1) removing bun                                                                                                                                                          [###########################################################################################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[I] agam@dev ~/g/opencode (dev)> bun
fish: Unknown command: bun
[I] agam@dev ~/g/opencode (dev) [127]> curl -fsSL https://bun.sh/install | bash
                                       exec $SHELL
######################################################################## 100.0%
bun was installed successfully to ~/.bun/bin/bun
Run 'bun --help' to get started
[I] agam@dev ~/g/opencode (dev)> bun install
bun install v1.3.5 (1e86cebd)

$ husky

26 packages installed [28.37s]
[I] agam@dev ~/g/opencode (dev)> bun dev
$ bun run --cwd packages/opencode --conditions=browser src/index.ts
error: Cannot find module '../../validators/validate.js' from '/home/agam/git/opencode/node_modules/.bun/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/generated/lowercase.js'

Bun v1.3.5 (Linux x64)
error: script "dev" exited with code 1
[I] agam@dev ~/g/opencode (dev) [1]> ./packages/opencode/script/build.ts --single
error: Cannot find module '../../validators/validate.js' from '/home/agam/git/opencode/node_modules/.bun/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/generated/lowercase.js'

Bun v1.3.5 (Linux x64)
[I] agam@dev ~/g/opencode (dev) [1]>

Screenshot and/or share link

No response

Operating System

Arch Linux

Terminal

TTY through SSH

Originally created by @agamsingh9 on GitHub (Jan 10, 2026). Originally assigned to: @thdxr on GitHub. ### Description Following `CONTRIBUTING.md`, I get the following error running `bun dev` or `./packages/opencode/script/build.ts --single` ``` error: Cannot find module '../../validators/validate.js' from '/home/agam/git/opencode/node_modules/.bun/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/generated/lowercase.js' ``` Please offer guidance. I've been stuck for a while trying to install opencode. ### Plugins _No response_ ### OpenCode version origin/dev ### Steps to reproduce ``` [I] agam@dev ~/g/opencode (dev)> git show --name-only commit f882cca98a2b245b695880499dfc4101d4ed924c (HEAD -> dev, origin/dev, origin/HEAD) Author: Jérôme Benoit <jerome.benoit@piment-noir.org> Date: Sat Jan 10 22:26:24 2026 +0100 fix(desktop): add missing StoreExt import and fix unused mut warning (#7707) packages/desktop/src-tauri/src/lib.rs [I] agam@dev ~/g/opencode (dev)> sudo pacman -S bun resolving dependencies... looking for conflicting packages... Packages (1) bun-1.3.5-2 Total Installed Size: 62.07 MiB :: Proceed with installation? [Y/n] (1/1) checking keys in keyring [#################################################] 100% (1/1) checking package integrity [#################################################] 100% (1/1) loading package files [#################################################] 100% (1/1) checking for file conflicts [#################################################] 100% (1/1) checking available disk space [#################################################] 100% :: Processing package changes... (1/1) installing bun [#################################################] 100% :: Running post-transaction hooks... (1/1) Arming ConditionNeedsUpdate... [I] agam@dev ~/g/opencode (dev)> bun install bun install v1.3.5-canary.1 (fa5a5bbe) $ husky + @actions/artifact@5.0.1 (v5.0.2 available) + @tsconfig/bun@1.0.9 (v1.0.10 available) + husky@9.1.7 + prettier@3.6.2 + sst@3.17.23 + turbo@2.5.6 + @aws-sdk/client-s3@3.933.0 + typescript@5.8.2 (v5.9.3 available) 3548 packages installed [152.35s] [I] agam@dev ~/g/opencode (dev)> bun dev $ bun run --cwd packages/opencode --conditions=browser src/index.ts error: Cannot find module '../../validators/validate.js' from '/home/agam/git/opencode/node_modules/.bun/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/generated/lowercase.js' Bun v1.3.5-canary.1+fa5a5bbe5 (Linux x64) error: script "dev" exited with code 1 [I] agam@dev ~/g/opencode (dev) [1]> ./packages/opencode/script/build.ts --single error: Cannot find module '../../validators/validate.js' from '/home/agam/git/opencode/node_modules/.bun/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/generated/lowercase.js' Bun v1.3.5-canary.1+fa5a5bbe5 (Linux x64) [I] agam@dev ~/g/opencode (dev) [1]> sudo rm -rf ~/.bun sudo pacman -Rns bun checking dependencies... Packages (1) bun-1.3.5-2 Total Removed Size: 62.07 MiB :: Do you want to remove these packages? [Y/n] :: Processing package changes... (1/1) removing bun [###########################################################################################################] 100% :: Running post-transaction hooks... (1/1) Arming ConditionNeedsUpdate... [I] agam@dev ~/g/opencode (dev)> bun fish: Unknown command: bun [I] agam@dev ~/g/opencode (dev) [127]> curl -fsSL https://bun.sh/install | bash exec $SHELL ######################################################################## 100.0% bun was installed successfully to ~/.bun/bin/bun Run 'bun --help' to get started [I] agam@dev ~/g/opencode (dev)> bun install bun install v1.3.5 (1e86cebd) $ husky 26 packages installed [28.37s] [I] agam@dev ~/g/opencode (dev)> bun dev $ bun run --cwd packages/opencode --conditions=browser src/index.ts error: Cannot find module '../../validators/validate.js' from '/home/agam/git/opencode/node_modules/.bun/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/generated/lowercase.js' Bun v1.3.5 (Linux x64) error: script "dev" exited with code 1 [I] agam@dev ~/g/opencode (dev) [1]> ./packages/opencode/script/build.ts --single error: Cannot find module '../../validators/validate.js' from '/home/agam/git/opencode/node_modules/.bun/@babel+types@7.28.5/node_modules/@babel/types/lib/builders/generated/lowercase.js' Bun v1.3.5 (Linux x64) [I] agam@dev ~/g/opencode (dev) [1]> ``` ### Screenshot and/or share link _No response_ ### Operating System Arch Linux ### Terminal TTY through SSH
yindo added the bug label 2026-02-16 17:45:00 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 10, 2026):

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

  • #7540: Does not build on Arch Linux (same user, same error pattern with module resolution in @babel/types and jose dependencies)

Feel free to ignore if this doesn't address your specific case.

@github-actions[bot] commented on GitHub (Jan 10, 2026): This issue might be a duplicate of existing issues. Please check: - #7540: Does not build on Arch Linux (same user, same error pattern with module resolution in @babel/types and jose dependencies) Feel free to ignore if this doesn't address your specific case.
Author
Owner

@agamsingh9 commented on GitHub (Jan 19, 2026):

@thdxr

@agamsingh9 commented on GitHub (Jan 19, 2026): @thdxr
Author
Owner

@rekram1-node commented on GitHub (Jan 19, 2026):

@agamsingh9 are you trying to install opencode?

I've been stuck for a while trying to install opencode.

Why did you read contributing.md then? What does this have to do w/ installing?

@rekram1-node commented on GitHub (Jan 19, 2026): @agamsingh9 are you trying to install opencode? > I've been stuck for a while trying to install opencode. Why did you read contributing.md then? What does this have to do w/ installing?
Author
Owner

@agamsingh9 commented on GitHub (Jan 19, 2026):

I originally tried installing with paru here.

I couldn't figure out how to get that working so I tried to install it from source by following CONTRIBUTING.md

@agamsingh9 commented on GitHub (Jan 19, 2026): I originally tried installing with `paru` [here](https://github.com/anomalyco/opencode/issues/7540). I couldn't figure out how to get that working so I tried to install it from source by following `CONTRIBUTING.md`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4677