Plugin “@netlify/plugin-nextjs” failed on React project

  Kiến thức lập trình

Good evening. I have a React project ( https://404projectschool.netlify.app/ ) and when i try to deploy it on netlify.com i get this error:

Netlify Build

8:56:08 PM: ​
8:56:08 PM: ❯ Using Next.js Runtime - v4.41.3
8:56:08 PM: ​
8:56:08 PM: ❯ Loading plugins
8:56:08 PM: - @netlify/[email protected] from Netlify app
8:56:08 PM: ​
8:56:08 PM: ❯ Outdated plugins
8:56:08 PM: - @netlify/[email protected]: latest version is 5.3.2
8:56:08 PM: To upgrade this plugin, please uninstall and re-install it from the Netlify plugins directory (Netlify App)
8:56:10 PM: No Next.js cache to restore.
8:56:10 PM: ​
8:56:10 PM: build.command from netlify.toml
8:56:10 PM: ──────────────────────────────────────────────────────────────────
8:56:22 PM: ​
8:56:22 PM: Error message
8:56:22 PM: Error: The directory “/opt/build/repo/build” does not contain a Next.js production build. Perhaps the build command was not run, or you specified the wrong publish directory.
8:56:22 PM: In most cases it should be set to “.next”, unless you have chosen a custom “distDir” in your Next config.
8:56:22 PM: If you are using “next export” then you should set the environment variable NETLIFY_NEXT_PLUGIN_SKIP to “true”.
8:56:22 PM: ​
8:56:22 PM: Plugin details
8:56:22 PM: Package: @netlify/plugin-nextjs
8:56:22 PM: Version: 4.41.3
8:56:22 PM: Repository: git+https://github.com/netlify/next-runtime.git
8:56:22 PM: npm link: @netlify/plugin-nextjs - npm
8:56:22 PM: Report issues: Issues · netlify/next-runtime · GitHub
8:56:22 PM: ​
8:56:22 PM: Error location
8:56:22 PM: In “onBuild” event in “@netlify/plugin-nextjs” from Netlify app

my netlify.toml file is:

[build]
command = “npm run build”
publish = “build”

I deleteed everything related to next and nextjs.

New contributor

znkbnk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT