Skip to content

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

@agamsingh9

Description

@agamsingh9

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions