opencode icon indicating copy to clipboard operation
opencode copied to clipboard

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

Open agamsingh9 opened this issue 2 days ago • 1 comments

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/@[email protected]/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 <[email protected]>
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/[email protected] (v5.0.2 available)
+ @tsconfig/[email protected] (v1.0.10 available)
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ @aws-sdk/[email protected]
+ [email protected] (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/@[email protected]/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/@[email protected]/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/@[email protected]/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/@[email protected]/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

agamsingh9 avatar Jan 10 '26 21:01 agamsingh9