I’ve tried different build commands but still it isn’t working. Ends with this log here. Can somebody help me- >
11:30:08 PM: Build ready to start
…skipping some unusefull logs…
11:30:58 PM: Plugin “@netlify/plugin-nextjs” failed
11:30:58 PM: ────────────────────────────────────────────────────────────────
11:30:58 PM:
11:30:58 PM: Error message
11:30:58 PM: Error: Your publish directory is pointing to the base directory of your site. This is not supported for Next.js sites, and is probably a mistake.
11:30:58 PM: In most cases it should be set to “.next”, unless you have chosen a custom “distDir” in your Next config, or the Next site is in a subdirectory.
11:30:58 PM:
11:30:58 PM: Plugin details
11:30:58 PM: Package: @netlify/plugin-nextjs
11:30:58 PM: Version: 4.22.0
11:30:58 PM: Repository: git+https://github.com/netlify/next-runtime.git
11:30:58 PM: npm link: @netlify/plugin-nextjs - npm
11:30:58 PM: Report issues: Issues · netlify/next-runtime · GitHub
11:30:58 PM:
11:30:58 PM: Error location
11:30:58 PM: In “onPreBuild” event in “@netlify/plugin-nextjs” from Netlify app
11:30:58 PM: at checkForRootPublish (/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/helpers/verification.js:99:9)
11:30:58 PM: at onPreBuild (/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/index.js:30:48)
11:30:58 PM:
11:30:58 PM: Resolved config
11:30:58 PM: build:
11:30:58 PM: command: npm run build
11:30:58 PM: commandOrigin: ui
11:30:58 PM: publish: /opt/build/repo
11:30:58 PM: publishOrigin: ui
11:30:58 PM: plugins:
11:30:58 PM: - inputs: {}
11:30:58 PM: origin: ui
11:30:58 PM: package: ‘@netlify/plugin-nextjs’
11:30:58 PM: Caching artifacts
11:30:58 PM: Started saving node modules
11:30:58 PM: Finished saving node modules
11:30:58 PM: Started saving build plugins
11:30:58 PM: Finished saving build plugins
11:30:58 PM: Started saving yarn cache
11:30:59 PM: Finished saving yarn cache
11:30:59 PM: Started saving pip cache
11:30:59 PM: Finished saving pip cache
11:30:59 PM: Started saving emacs cask dependencies
11:30:59 PM: Finished saving emacs cask dependencies
11:30:59 PM: Started saving maven dependencies
11:30:59 PM: Finished saving maven dependencies
11:30:59 PM: Started saving boot dependencies
11:30:59 PM: Finished saving boot dependencies
11:30:59 PM: Started saving rust rustup cache
11:30:59 PM: Finished saving rust rustup cache
11:30:59 PM: Started saving go dependencies
11:30:59 PM: Finished saving go dependencies
11:31:00 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:31:00 PM: Creating deploy upload records
11:31:00 PM: Failing build: Failed to build site
11:31:00 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
11:31:00 PM: Finished processing build request in 32.962637025s