Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Doesn't Work: Could not load preload-helper.js/index.web.js (imported by virtual:one-entry): Is a directory #338

Open
Barzi-Ahmed opened this issue Dec 24, 2024 · 5 comments

Comments

@Barzi-Ahmed
Copy link

OS: macOS 15.2
One: v1.1.371
Bun 1.1.42
Vite: 6.0.5

When I try to build one for web using the command "bun x one build web", the build fails and I get the following error message:

barziahmed@username-Mac-mini myapp % bun x one build web

 🔨 build client

vite v6.0.5 building for production...
✓ 2 modules transformed.
x Build failed in 17ms

[2:05:06 AM]  ERROR  { [EISDIR: [vite:load-fallback] Could not load /Users/username/Desktop/monorepo/packages/myapp/vite/preload-helper.js/index.web.js (imported by virtual:one-entry): Is a directory]
  code: 'PLUGIN_ERROR',
  fd: 7,
  syscall: 'read',
  errno: -21,
  pluginCode: 'EISDIR',
  plugin: 'vite:load-fallback',
  hook: 'load',
  watchFiles:
   [ 'package.json',
     '/Users/username/Desktop/monorepo/node_modules/one/dist/esm/index.mjs',
     '/Users/username/Desktop/monorepo/packages/myapp/app/_layout.tsx',
     '/Users/username/Desktop/monorepo/packages/myapp/app/index.tsx',
     '/Users/username/Desktop/monorepo/packages/myapp/app/rpc.tsx/[rpc]+api.tsx' ] } 



[2:05:06 AM]  ERROR  [vite:load-fallback] Could not load /Users/username/Desktop/monorepo/packages/myapp/vite/preload-helper.js/index.web.js (imported by virtual:one-entry): Is a directory
@Barzi-Ahmed Barzi-Ahmed changed the title One Build Doesn't Work: Could not load preload-helper.js/index.web.js (imported by virtual:one-entry): Is a directory Build Doesn't Work: Could not load preload-helper.js/index.web.js (imported by virtual:one-entry): Is a directory Dec 24, 2024
@natew
Copy link
Collaborator

natew commented Dec 27, 2024

@Barzi-Ahmed have a repro for me?

@Barzi-Ahmed
Copy link
Author

@natew it is the same template when starting "bun x one". The template is "Minimal Tamagui".
I tried again now, and its the same error message.

@natew
Copy link
Collaborator

natew commented Jan 1, 2025

Worked for me just now in a fresh clone:

CleanShot 2025-01-01 at 00 20 37@2x

Do you see patches running (from a fresh clone)?

CleanShot 2025-01-01 at 00 21 08@2x

@Barzi-Ahmed
Copy link
Author

@natew, no I don't see any patches from my side. I just get this error? Is it related to macos issue or bun issues?

barziahmed@Pandas-Mac-mini myapp % bunx one build

 🔨 build client


    ➡ [tamagui] built config and components (111ms)
vite v6.0.6 building for production...
transforming (1) virtual:one-entry 🪄 app/_layout.tsx
 🪄 app/_layout.tsx
✓ 2 modules transformed.
x Build failed in 144ms


[6:53:26 PM]  ERROR  { [EISDIR: [vite:load-fallback] Could not load /Users/panda/Desktop/monorepo/packages/myapp/vite/preload-helper.js/index.web.js (imported by virtual:one-entry): Is a directory]
  code: 'PLUGIN_ERROR',
  fd: 8,
  syscall: 'read',
  errno: -21,
  pluginCode: 'EISDIR',
  plugin: 'vite:load-fallback',
  hook: 'load',
  watchFiles:
   [ 'package.json',
     '/Users/panda/Desktop/monorepo/node_modules/one/dist/esm/index.mjs',
     '/Users/panda/Desktop/monorepo/packages/myapp/app/_layout.tsx' ] } 



[6:53:26 PM]  ERROR  [vite:load-fallback] Could not load /Users/panda/Desktop/monorepo/packages/myapp/vite/preload-helper.js/index.web.js (imported by virtual:one-entry): Is a directory

barziahmed@Pandas-Mac-mini myapp % 

@Barzi-Ahmed
Copy link
Author

@natew, I've just found out that the build command works if I run it with Node.js instead of Bun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants