meilisearch / demos

A list of Meilisearch demos with open-source code and live preview ⚡️

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

e-commerce deploy fails on Vercel

mdubus opened this issue · comments

FYI @shivaylamba

The deployment of the e-commerce demo fails on Vercel. See here.

Capture d’écran 2022-06-09 à 17 10 22

In order to fix the issue, you need to add "sourceType": "module" in the .eslintrc.json file:

 "parserOptions": {
    "sourceType": "module",
    "ecmaVersion": 12
  },

But then, it raises other errors because eslint is still not configured properly:

Capture d’écran 2022-06-09 à 17 54 26

In order to fix it, you need to do the following:

  • Addition of next in the extends list of the .eslintrc.json file:
"extends": ["next", "eslint:recommended", "plugin:prettier/recommended"],
  • Update of the eslint scripts in the package.json file in order to lint the JSX files and not only the JS ones:
    "lint": "eslint --ext .js,.jsx .",
    "lint:fix": "eslint --ext .js,.jsx . --fix",

Then the linter should finally run correctly and raise a lot of errors in the JSX files:

Capture d’écran 2022-06-09 à 17 57 21

By running npm run lint:fix it should fix the majority of these linter issues (quotes, semicolons, ...)

Only 2 warning are still present and can be fixed manually:

Capture d’écran 2022-06-09 à 17 58 39

Thank you @mdubus I have made the necessary changes in the PR.