I have a Next JS app on a plesk sever. When visiting the URL, an error message displays
I’ve tried the following to resolve
- Added “type” : “modules” to package.json. This didn’t work as it broke during build process.
- Removed the ‘Import Header from…’ from layout.js. The next import (e.g. footer) displays within the error message
Here is the package.json
{
"name": "myheadless",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@vercel/speed-insights": "^1.0.10",
"next": "^14.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"swr": "^2.2.4"
},
"devDependencies": {
"autoprefixer": "^10.4.16",
"eslint": "^8",
"eslint-config-next": "^14.1.0",
"postcss": "^8.4.31",
"sass": "^1.70.0",
"tailwindcss": "^3.3.5"
}
}
Here is the node set up in plesk.
The strange thing is App works with no issues when working on my local copy. Running NPM run build, npm run dev and npm run start causes no issues which makes me think is the node config in plesk correct?
Any help much appreciated.