Skip to content

Error: Default condition should be last one #30

@Rutger-Knijnenburg

Description

@Rutger-Knijnenburg

Describe the bug
I'm trying to implement the sample code into my project, however even the sample code gives me a weird error.

To Reproduce
Steps to reproduce the behavior:

  1. New project
  2. Install dependencies
  3. Build project
  4. Error pops up

Expected behavior
No error of course ;)

Desktop (please complete the following information):

  • Windows 11
  • Chrome
  • Version 121.0.6167.140

Additional context

This are my current dependencies. It might be something with versions or something? But I have no idea which one could be the issue. If I remove the Color picker code my project builds fine :)

"dependencies": {
    "@date-io/date-fns": "^2.16.0",
    "@draft-js-plugins/alignment": "^5.0.3",
    "@draft-js-plugins/editor": "^4.1.3",
    "@draft-js-plugins/focus": "^4.1.3",
    "@draft-js-plugins/static-toolbar": "^4.1.3",
    "@emotion/react": "^11.10.5",
    "@emotion/styled": "^11.10.5",
    "@mui/icons-material": "^5.14.7",
    "@mui/lab": "^5.0.0-alpha.108",
    "@mui/material": "^5.14.7",
    "@mui/styles": "^5.14.11",
    "@react-pdf/renderer": "^3.0.1",
    "@reduxjs/toolkit": "^1.9.0",
    "ajv": "^8.12.0",
    "axios": "^1.4.0",
    "date-fns": "^2.29.3",
    "dotenv": "^16.0.3",
    "draft-convert": "^2.1.13",
    "draft-js": "^0.11.7",
    "file-loader": "^6.2.0",
    "html-react-parser": "^4.2.2",
    "lodash-es": "^4.17.21",
    "moment": "^2.29.4",
    "mui-color-input": "^2.0.1",
    "react": "^18.2.0",
    "react-beautiful-dnd": "^13.1.1",
    "react-dom": "^18.2.0",
    "react-draft-wysiwyg": "^1.15.0",
    "react-images": "^1.2.0-beta.7",
    "react-mui-dropzone": "^4.0.7",
    "react-photo-gallery": "^8.0.0",
    "react-redux": "^8.0.5",
    "react-router-dom": "^6.4.3",
    "react-scroll": "^1.8.8",
    "react-spring": "^9.5.5",
    "react-use-gesture": "^9.0.4",
    "redux": "^4.2.0",
    "rxjs": "^7.5.7",
    "sass": "^1.56.1",
    "sweetalert2": "^11.6.9",
    "typewriter-effect": "2.19.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.2",
    "@babel/preset-env": "^7.20.2",
    "@babel/preset-react": "^7.18.6",
    "@types/node": "^20.7.1",
    "@types/react": "^18.2.23",
    "@types/react-dom": "^18.2.8",
    "@types/react-router-dom": "^5.3.3",
    "@typescript-eslint/eslint-plugin": "^5.43.0",
    "@typescript-eslint/parser": "^5.43.0",
    "babel-loader": "^9.1.0",
    "css-loader": "^6.7.2",
    "eslint": "^8.27.0",
    "eslint-plugin-react": "^7.31.10",
    "html-webpack-plugin": "^5.5.0",
    "prettier": "^2.7.1",
    "sass-loader": "^13.2.0",
    "style-loader": "^3.3.1",
    "ts-loader": "^9.4.1",
    "typescript": "^4.9.3",
    "url-loader": "^4.1.1",
    "webpack": "^5.75.0",
    "webpack-cli": "^5.0.0",
    "webpack-dev-server": "^4.11.1"
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions