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

Avoid missing directory error when running dev #3224

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joshuafredrickson
Copy link
Contributor

@joshuafredrickson joshuafredrickson commented Feb 6, 2025

When pulling down a fresh copy of Sage and running yarn && yarn dev, the following error occurs due to a missing public directory:

$ vite
node:fs:2426
    return binding.writeFileUtf8(
                   ^

Error: ENOENT: no such file or directory, open 'public/hot'
    at Object.writeFileSync (node:fs:2426:20)
    at Server.<anonymous> (file:///***/sage/wp-content/themes/sage/node_modules/laravel-vite-plugin/dist/index.js:110:14)
    at Object.onceWrapper (node:events:638:28)
    at Server.emit (node:events:536:35)
    at emitListeningNT (node:net:1980:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:89:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'public/hot'
}

This error doesn't occur if you happen to run yarn build before yarn dev. Adding an empty public directory to the repo alleviates this issue.

@joshuafredrickson joshuafredrickson changed the title Avoid missing folder error when running dev Avoid missing directory error when running dev Feb 6, 2025
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

Successfully merging this pull request may close these issues.

1 participant