Cloudflare Pages build error

I'm getting a Cloudflare Pages build error. To deploy a project based on Vite (React), I built it. But it got stuck with the error log below. I also tried using the "vite build" command, but the result was same. How can I resolve this issue? Website link: https://corydalis10.pages.dev Deployment ID: 68b1493c-21de-41c0-84a1-abb4d8e52059 Account ID: 2ad2e0660f721055a476740ea40c724e Error log:
7 Replies
Cyb3r-Jak3
Cyb3r-Jak32mo ago
Looks like your project is missing the package.json file
2025-01-28T03:29:59.152363Znpm ERR! code ENOENT
2025-01-28T03:29:59.152946Znpm ERR! syscall open
2025-01-28T03:29:59.153075Znpm ERR! path /opt/buildhome/repo/package.json
2025-01-28T03:29:59.153255Znpm ERR! errno -2
2025-01-28T03:29:59.153798Znpm ERR! enoent ENOENT: no such file or directory, open '/opt/buildhome/repo/package.json'
2025-01-28T03:29:59.153904Znpm ERR! enoent This is related to npm not being able to find a file.
2025-01-28T03:29:59.152363Znpm ERR! code ENOENT
2025-01-28T03:29:59.152946Znpm ERR! syscall open
2025-01-28T03:29:59.153075Znpm ERR! path /opt/buildhome/repo/package.json
2025-01-28T03:29:59.153255Znpm ERR! errno -2
2025-01-28T03:29:59.153798Znpm ERR! enoent ENOENT: no such file or directory, open '/opt/buildhome/repo/package.json'
2025-01-28T03:29:59.153904Znpm ERR! enoent This is related to npm not being able to find a file.
corydalis10
corydalis10OP2mo ago
@Cyb3r-Jak3 I'm using pnpm. Is pnpm not supported?
Cyb3r-Jak3
Cyb3r-Jak32mo ago
Pnpm is supported.
corydalis10
corydalis10OP2mo ago
@Cyb3r-Jok3 But why do I get an error?
Cyb3r-Jak3
Cyb3r-Jak32mo ago
The error says because the package.json file is missing. You should check that all the files needed are a part of the repo
corydalis10
corydalis10OP2mo ago
GitHub
GitHub - corydalis10/portfolio
Contribute to corydalis10/portfolio development by creating an account on GitHub.
corydalis10
corydalis10OP2mo ago
@Cyb3r-Jak3 Sorry :( It was my repository mistake.

Did you find this page helpful?