Hello there! Help me pls!

I am going to hosting my portfolio site in render.com. but in offten, there is error. can you help me?
error is like this:
ld command ‘npm run build’…
Nov 16 10:07:39 PM
Nov 16 10:07:39 PM > folio@2.0.0 build /opt/render/project/src
Nov 16 10:07:39 PM > next build
Nov 16 10:07:39 PM
Nov 16 10:07:39 PM sh: 1: next: not found
Nov 16 10:07:39 PM npm ERR! code ELIFECYCLE
Nov 16 10:07:39 PM npm ERR! syscall spawn
Nov 16 10:07:39 PM npm ERR! file sh
Nov 16 10:07:39 PM npm ERR! errno ENOENT
Nov 16 10:07:39 PM npm ERR! folio@2.0.0 build: next build
Nov 16 10:07:39 PM npm ERR! spawn ENOENT
Nov 16 10:07:39 PM npm ERR!
Nov 16 10:07:39 PM npm ERR! Failed at the folio@2.0.0 build script.
Nov 16 10:07:39 PM npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Nov 16 10:07:39 PM
Nov 16 10:07:39 PM npm ERR! A complete log of this run can be found in:
Nov 16 10:07:39 PM npm ERR! /opt/render/.cache/_logs/2023-11-16T13_07_39_854Z-debug.log
Nov 16 10:07:39 PM ==> Build failed :disappointed:

Hi,

Looks like ‘next’ command is not available in your build environment. Check ‘package.json’ file and ensure that ‘next’ is listed as a dependency in your package.json file. If it’s not listed, you should add it. The package.json should look something like this:

{
  "name": "your-app-name",
  "version": "1.0.0",
  "scripts": {
    "build": "next build"
    // other scripts
  },
  "dependencies": {
    "next": "latest",
    // other dependencies
  }
}

also make sure that you are running ‘npm install’ before the build command to install all the necessary dependencies, including next.js

Thanks pawt! but I have already set the next.
{
“name”: “folio”,
“version”: “2.0.0”,
“private”: true,
“scripts”: {
“dev”: “next dev”,
“build”: “next build”,
“start”: “next start”,
“lint”: “next lint”
},
“dependencies”: {
“gsap”: “3.8.0”,
“next”: “^12.3.4”,
“react”: “^17.0.2”,
“react-dom”: “^17.0.2”,
“sass”: “^1.32.12”,
“typed.js”: “^2.0.12”,
“vanilla-tilt”: “^1.7.0”
},
“devDependencies”: {
“@types/node”: “^17.0.21”,
“@types/react”: “^17.0.4”,
“autoprefixer”: “^10.4.7”,
“eslint”: “7.32.0”,
“eslint-config-next”: “11.1.2”,
“postcss”: “^8.4.14”,
“tailwindcss”: “^3.1.4”,
“typescript”: “^4.2.4”
},
“license”: “MIT”,
“copyright.owner”: “helman”
}

Hi there!
Can you help me?

Hi Pawt! I think you are an expert developer. help my worries pls.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.