Error: ENOENT: no such file or directory, open '/home/ubuntu/---------/.next/BUILD_ID']
Unanswered
Acorn-plum gall posted this in #help-forum
Acorn-plum gallOP
I deploy to ec2
run "npm run build", but my server doesn't work
When I run "pm2 logs" it shows:
I tried to rebuild. It doesn't work. I don't see BUILD_ID in my .next directory.
My pachage.json is:
run "npm run build", but my server doesn't work
When I run "pm2 logs" it shows:
[Error: ENOENT: no such file or directory, open '/home/ubuntu/--------/.next/BUILD_ID'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/ubuntu/------/.next/BUILD_ID'
}I tried to rebuild. It doesn't work. I don't see BUILD_ID in my .next directory.
My pachage.json is:
{
"name": "frontendaiportal",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.1",
"@mui/lab": "^5.0.0-alpha.137",
"@mui/material": "^5.14.2",
"clsx": "^2.0.0",
"dompurify": "^3.0.5",
"html-react-parser": "^4.2.1",
"isomorphic-dompurify": "^1.8.0",
"next": "^13.5.3",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"server-only": "^0.0.1",
"swr": "^2.2.0"
},
"devDependencies": {
"eslint": "8.45.0",
"eslint-config-next": "^13.5.3"
}
}