seokju-na / react-thermal-printer

React for thermal printing
MIT License
267 stars 34 forks source link

Error Uncaught TypeError: Cannot read properties of undefined (reading 'prototype') #62

Open matheusbento opened 8 months ago

matheusbento commented 8 months ago

Hey Guys, I do not have the printer yet, but I'm trying to test this library, I'm getting the follow error:

image

How can I solve this??

Packages:


"dependencies": {
    "@formatjs/intl-pluralrules": "4.3.3",
    "@formatjs/intl-relativetimeformat": "10.0.1",
    "@fortawesome/fontawesome-free": "6.1.1",
    "@hello-pangea/dnd": "^16.3.0",
    "@hotjar/browser": "^1.0.9",
    "@popperjs/core": "2.11.5",
    "@react-google-maps/api": "^2.19.0",
    "@storybook/react": "^7.3.2",
    "animate.css": "4.1.1",
    "apexcharts": "3.35.0",
    "axios": "0.26.1",
    "bootstrap": "5.2.2",
    "bootstrap-icons": "^1.5.0",
    "bootstrap-switch-button-react": "^1.2.0",
    "chart.js": "3.7.1",
    "clsx": "1.1.1",
    "formik": "2.2.9",
    "glamor": "^2.20.40",
    "i18next": "^23.4.6",
    "i18next-browser-languagedetector": "^7.1.0",
    "js-cookie": "^3.0.5",
    "laravel-echo": "^1.12.1",
    "line-awesome": "1.3.0",
    "lodash": "^4.17.21",
    "moment": "^2.29.4",
    "moment-timezone": "^0.5.43",
    "nouislider": "15.5.1",
    "polished": "^4.2.2",
    "prism-react-renderer": "1.3.1",
    "prism-themes": "1.9.0",
    "prismjs": "1.28.0",
    "pusher-js": "^7.2.0",
    "qs": "6.10.3",
    "react": "18.0.0",
    "react-apexcharts": "1.4.0",
    "react-app-alias": "^2.2.2",
    "react-app-rewired": "^2.2.1",
    "react-beautiful-dnd": "^12.1.0",
    "react-bootstrap": "2.5.0-beta.1",
    "react-copy-to-clipboard": "5.1.0",
    "react-dates": "^21.8.0",
    "react-dom": "18.0.0",
    "react-hook-form": "^7.45.0",
    "react-i18next": "^13.2.1",
    "react-if": "^4.1.5",
    "react-inlinesvg": "3.0.0",
    "react-input-mask": "3.0.0-alpha.2",
    "react-intl": "5.25.0",
    "react-number-format": "^4.9.3",
    "react-qr-code": "^2.0.12",
    "react-query": "3.38.0",
    "react-router-dom": "6.3.0",
    "react-scripts": "5.0.1",
    "react-svg": "^16.1.22",
    "react-table": "^7.7.0",
    "react-thermal-printer": "^0.17.0",
    "react-to-print": "^2.14.13",
    "react-toastify": "^9.1.3",
    "react-topbar-progress-indicator": "4.1.1",
    "sass": "^1.66.1",
    "socicon": "3.0.5",
    "yup": "0.32.11"
  },
  "devDependencies": {
    "@testing-library/jest-dom": "5.16.4",
    "@testing-library/react": "13.1.1",
    "@testing-library/user-event": "13.5.0",
    "@types/bootstrap": "5.1.10",
    "@types/chart.js": "2.9.37",
    "@types/jest": "27.4.1",
    "@types/node": "16.11.27",
    "@types/prismjs": "1.26.0",
    "@types/qs": "6.9.7",
    "@types/react": "18.0.6",
    "@types/react-beautiful-dnd": "^13.1.4",
    "@types/react-copy-to-clipboard": "5.0.2",
    "@types/react-dates": "^21.8.3",
    "@types/react-dom": "18.0.2",
    "@types/react-input-mask": "^3.0.2",
    "@types/react-table": "^7.7.9",
    "@types/sass-loader": "8.0.3",
    "@vitejs/plugin-react": "^4.0.4",
    "@vitejs/plugin-react-refresh": "^1.3.6",
    "css-loader": "6.7.1",
    "del": "6.0.0",
    "mini-css-extract-plugin": "2.6.1",
    "prettier": "2.6.2",
    "rtlcss-webpack-plugin": "4.0.7",
    "sass-loader": "13.0.2",
    "typescript": "4.6.3",
    "vite": "^4.4.9",
    "webpack": "5.74.0",
    "webpack-cli": "4.10.0"
  },
12-Davance commented 7 months ago

@seokju-na I'm also facing the same issue.

image

hempun10 commented 2 months ago

@12-Davance @matheusbento have you guys find any solutions?

Felipalds commented 2 months ago

The same error here. Any solution?

Felipalds commented 2 months ago

I am pretty sure that is something integrating the vite with the library

hempun10 commented 2 months ago

@Felipalds I think so

Litibe commented 2 months ago

I have same probleme with Image.

chamals3n4 commented 2 months ago

@Litibe have you find any solution

Litibe commented 2 months ago

i work with next.js, i can print with ethernet but it's not possible, same probleme. Also i don't use it :'(