Giter Site home page Giter Site logo

Comments (12)

damdafayton avatar damdafayton commented on May 28, 2024 1

Hi,
Finally I solved the problem by updating react-scripts from version ^4 to 5.0.0

from cookie-consent-banner.

pboeder avatar pboeder commented on May 28, 2024

Seems that your setup has issues with the nullish coelescing operator (??).

What is your setup?
Are you using create-react-app?
Which node version are you running?

from cookie-consent-banner.

damdafayton avatar damdafayton commented on May 28, 2024

Yes I am using create-react-app
Node version is v14.17.3

File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|   const acceptedCategoriesListener = event => {
|     if (isCustomEvent(event)) {
>       setAcceptedCategories(event.detail.acceptedCategories ?? []);
|     }
|   };
    at Object../node_modules/@porscheofficial/cookie-consent-banner-react/lib/module/index.js (RefreshUtils.js:168:1)
    at __webpack_require__ (bootstrap:856:1)
    at fn (bootstrap:150:1)
    at Module.<anonymous> (bootstrap.min.css:7:1)
    at Module../src/App.js (App.js:293:1)
    at __webpack_require__ (bootstrap:856:1)
    at fn (bootstrap:150:1)
    at Module.<anonymous> (wave.jpg:1:1)
    at Module../src/index.js (index.js:17:1)
    at __webpack_require__ (bootstrap:856:1)
    at fn (bootstrap:150:1)
    at Object.1 (utils.js:191:1)
    at __webpack_require__ (bootstrap:856:1)
    at checkDeferredModules (bootstrap:45:1)
    at Array.webpackJsonpCallback [as push] (bootstrap:32:1)
    at main.chunk.js?__WB_REVISION__=013aac3d6d7af22fde2258807dc5984e:1:59```

This is the error completely.

from cookie-consent-banner.

pboeder avatar pboeder commented on May 28, 2024

Which version of create-react-app?

from cookie-consent-banner.

damdafayton avatar damdafayton commented on May 28, 2024
 "react-dom": "^17.0.2",
 "react-helmet": "^6.1.0",
 "react-native-svg": "^12.1.1",
 "react-router-dom": "^6.0.2",
 "react-scripts": "4.0.3",

Actually I started to implement directly into index.html but even that seems very complicated 😅

from cookie-consent-banner.

pboeder avatar pboeder commented on May 28, 2024

Interesting.
Unfortunately, I'm unable to replicate the issue.
The component works fine with react-scripts v4: https://codesandbox.io/s/vibrant-kilby-glbxj?file=/src/App.js

Would be great if you provide a codesandbox so I can figure out the issue.
Probably you have some changes in your tsconfig.js or your webpack setup that leads to the error.

from cookie-consent-banner.

damdafayton avatar damdafayton commented on May 28, 2024

Ok I will check

from cookie-consent-banner.

damdafayton avatar damdafayton commented on May 28, 2024

Btw finally I am able to make it work on html with tag manager but cursor doesnt change into pointer over buttons.

from cookie-consent-banner.

pboeder avatar pboeder commented on May 28, 2024

Hi @damdafayton ! Should be fixed with v2.1.3. Can you confirm?

from cookie-consent-banner.

damdafayton avatar damdafayton commented on May 28, 2024

Yes its fixed 👍 Thx.

from cookie-consent-banner.

damdafayton avatar damdafayton commented on May 28, 2024

Ive tried on codesandbox and it works there too. For some reason, still it doesnt work on mine. I will check another time.

The way i made it work is that i just copied the whole cookie-consent-banner library into react's app/public and inserted the .esm.js file into index.html.

So it serves the purpose currently. Great library 💯

from cookie-consent-banner.

pboeder avatar pboeder commented on May 28, 2024

Thanks :)

from cookie-consent-banner.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.