find the error while deploying the next.js file in namecheap server

Viewed 22

I am stuck in the deployment phase of the next.js app in NameCheap server the file is working properly in localhost but it shows an error when I deploy it on NameCheap hosting service.

returncode: 0
stdout:
> yourguide-next-frontend@0.1.0 dev /home/yourhikf/dev.yourguide.pk
> node server.js
stderr:
npm WARN lifecycle The node binary used for scripts is /home/yourhikf/nodevenv/dev.yourguide.pk/14/bin/node but npm is using /opt/alt/alt-nodejs14/root/usr/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
error - Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error

The next.config file is

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: false,
  swcMinify: true,
}

module.exports = nextConfig

I am unable to find the mistake because I install all the package from run npm install. kindly tell me the solution of my problem.

0 Answers
Related