So I’ve the deploy-preview build from the github pull request, and getting 404 http response
{"code":404,"msg":"File not found"}
So I’ve the deploy-preview build from the github pull request, and getting 404 http response
{"code":404,"msg":"File not found"}
Hey there, @Yudi_Xiao
Thanks for reaching out about this! Sorry to hear you are encountering obstacles.
We will need a bit more information in order to look into this further. Can you please share a link to your Netlify site, your deploy log, and a link to your project repo? If that isn’t public, can you please share your package.json
or .toml
file? Thanks so much
I try to do an manually build from netlify-cli with command
netlify deploy --build
and everything in this build is working okay
here is package.json
{
"name": "rebuff-shop",
"version": "1.1.0",
"private": true,
"scripts": {
"dev.netlify.live": "netlify dev --live",
"dev.netlify.local": "netlify dev",
"preview.netlify": "netlify build --context deploy-prview",
"netlify.deploy.draft": "netlify deploy --build",
"dev": "next dev",
"build": "next build",
"lint": "next lint"
},
"dependencies": {
"@emotion/react": "^11.8.1",
"@emotion/styled": "^11.8.1",
"@fingerprintjs/fingerprintjs-pro": "^3.5.5",
"@material-ui/core": "^4.12.3",
"@material-ui/icons": "^4.11.2",
"@mui/material": "^5.4.3",
"@netlify/functions": "^1.0.0",
"@reactivex/rxjs": "^6.6.7",
"@sendgrid/mail": "^7.6.1",
"@sentry/integrations": "^6.19.2",
"@sentry/nextjs": "^6.18.2",
"@sentry/rrweb": "^0.3.1",
"@sentry/tracing": "^6.19.2",
"cookies-next": "^2.0.4",
"graphql-request": "^4.1.0",
"next": "12.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-unity-webgl": "^8.8.0",
"rrweb": "^1.1.2",
"tslog": "^3.3.2",
"yarn": "^1.22.17"
},
"devDependencies": {
"@types/node": "17.0.19",
"@types/react": "17.0.39",
"eslint": "8.9.0",
"eslint-config-next": "12.1.0",
"netlify-cli": "^9.13.6",
"typescript": "4.5.5"
}
}
and netlify.toml
[build]
command = "npm run build"
functions = "pages/api"
publish = ".next"
[[plugins]]
package = "@netlify/plugin-nextjs"
[[plugins]]
package = "netlify-plugin-cache-nextjs"
[[plugins]]
package = "@sentry/netlify-build-plugin"
[[headers]]
for = "/Build/*.data"
[headers.values]
Content-Type = "application/octet-stream"
[[headers]]
for = "/Build/*.data.br"
[headers.values]
Content-Encoding = "br"
Content-Type = "application/octet-stream"
[[headers]]
for = "/Build/*.wasm"
[headers.values]
Content-Type = "application/wasm"
[[headers]]
for = "/Build/*.wasm.br"
[headers.values]
Content-Encoding = "br"
Content-Type = "application/wasm"
[[headers]]
for = "/Build/*.js"
[headers.values]
Content-Type = "application/javascript"
[[headers]]
for = "/Build/*.js.br"
[headers.values]
Content-Encoding = "br"
Content-Type = "application/javascript"
Hey @Yudi_Xiao,
Could you please share the URL of the file giving you the error? I checked the link you shared and only see 2 404s: 1 for favicon.ico and 1 for the Netlify CDP file. Both of these don’t seem to affect the site in any way.