0

Folder Structure:

enter image description here

I'm engaged in web 3.0 project work. Now that I want to show my boss a demo, I'm trying to create the build and upload it to Netlify.   Running yarn run build results in an error. I'm new to next.js and can't fix the problem. Please, if you can, assist me.

 yarn run v1.22.19
    $ next build
    Browserslist: caniuse-lite is outdated. Please run:
    npx browserslist@latest --update-db
    
    Why you should do it regularly:
    https://github.com/browserslist/browserslist#browsers-data-updating
    info  - Checking validity of types
    Browserslist: caniuse-lite is outdated. Please run:
    npx browserslist@latest --update-db
    
    Why you should do it regularly:
    https://github.com/browserslist/browserslist#browsers-data-updating
    
    Failed to compile.

   //  Warnings and errors 

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Package.json:

  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },

.eslintrc.json :

{
  "extends": "next/core-web-vitals"
}
sohaib
  • 574
  • 5
  • 16

1 Answers1

-1

Inside your project path, run this command:

npx browserslist@latest --update-db

Or, not recommended: Change your .eslintrc.json

{
  "extends": "next",
  "rules": {
    "react/no-unescaped-entities": "off",
    "@next/next/no-page-custom-font": "off"
  }
}
Maiky
  • 126
  • 9