Comments (14)
Hello @Ghaleb-alnakhlani ,
first thank you for publishing the issue. And second: sorry for the late reply.
Unfortunately we don't use React and Vercel, so it's difficult to say, what went wrong.
Our lib is a simple javascript file (we use some polyfills because of IE11-support), and it should work out of the box.
As you said, it works fine, when you run the app locally. So there might be a problem, when you package the app and deploy it.
Can you share more details about the problem?
Which Browser (+ version) did you use? Do you have the problem in any browser?
The stacktrace and exact position of the error. And the used (packaged) file (or part of the file), where the error occured.
Maybe you can provide a small setup (a small git-project), where we can reproduce the error?
Thank you in advance
from cookieconsent.
Hi @robindanzinger glad to get hear back from u.
I am still not sure if it is problem with your script. it seems the problem with vercel i guess or similar setup structure server like vercel.
The problem occurs on both browsers Chrome (latest) Mozila (latest).
here is the error
But as i said earlier it seems not a problem with you script which is working fine on localhost
I have a question out of this scrope?
how to hide cookie setting button from the page ?
Thank you for this library after searching alot i found yours the best.
from cookieconsent.
Hello @Ghaleb-alnakhlani ,
thank you for sharing the screenshot. What I do not understand: the file shown is the home.html. But selected is the polyfills.js.
Maybe the polyfill.js was overwritten and contains now html-code (instead of javascript). Maybe it's only the wrong screenshot.
Here the screenshot with some markers, what I find confusing:
from cookieconsent.
Polyfills.js should look like this:
from cookieconsent.
Hello @ Ghaleb-alnakhlani,
Thanks a lot! Nice to hear that:)
You can throw out the settings button by deactivating the entire button with the class "cookieconsent-banner__button - settings" in CookieConsent.js.
In addition, this will probably make the "showCookieConsentSettings" function superfluous. But you would have to test that.
from cookieconsent.
Hello @Ghaleb-alnakhlani ,
thank you for sharing the screenshot. What I do not understand: the file shown is the home.html. But selected is the polyfills.js.
Maybe the polyfill.js was overwritten and contains now html-code (instead of javascript). Maybe it's only the wrong screenshot.Here the screenshot with some markers, what I find confusing:
@robindanzinger that is the problem and don`t worry i just confirmed it is something with server some of files they are changed , js file to html which is weird behavior, but if you know a solution to this problem you can suggest how to solve it.
from cookieconsent.
Hello @ Ghaleb-alnakhlani,
Thanks a lot! Nice to hear that:)
You can throw out the settings button by deactivating the entire button with the class "cookieconsent-banner__button - settings" in CookieConsent.js.
In addition, this will probably make the "showCookieConsentSettings" function superfluous. But you would have to test that.
thank you I will test that, I also got another idea to hide the button using CSS I will find which one works best.
from cookieconsent.
Maybe it's a problem with source-naming: If you are sure, that the server contains the correct libs, but it serves other files, it looks like the naming of the source is wrong (and the default behavior is to serve the home.html). Maybe a relative path don't work here. Then change the src attribute for all 3 files (cookieconsent.js, polyfill.js, cookieconsent.css) in your home.html (or where you include the files):
src="lib/..." -> src="https://lbs-rouge.vercel.app/lib/..."
How do you load other resources (js, css) from the server?
from cookieconsent.
Maybe it's a problem with source-naming: If you are sure, that the server contains the correct libs, but it serves other files, it looks like the naming of the source is wrong (and the default behavior is to serve the home.html). Maybe a relative path don't work here. Then change the src attribute for all 3 files (cookieconsent.js, polyfill.js, cookieconsent.css) in your home.html (or where you include the files):
src="lib/..." -> src="https://lbs-rouge.vercel.app/lib/..."
How do you load other resources (js, css) from the server?
Good idea I will try to do that, although it should pick automatically the url, but i need to try this if it works.
Other resources loads correctly and noticed other warning from other files as well. Seems the server having hard time with some of the files to load correctly.
from cookieconsent.
No, as I see it, the files are not uploaded to the server (or they are at a different location). Also the other css files can't be loaded:
<link href="/css/fontawesome.css" rel="stylesheet">
<link href="/css/brands.css" rel="stylesheet">
<link href="/css/solid.css" rel="stylesheet">
And when I directly type in the address, I get an empty page:
https://lbs-rouge.vercel.app/lib/polyfills.js
Are you sure, you have uploaded the files to the correct location?
from cookieconsent.
There is a static folder. Maybe you have to upload the files to static/js or static/css. Or there is a misconfiguration when packaging the app with vercel (so the css and js files are not included).
from cookieconsent.
There is a static folder. Maybe you have to upload the files to static/js or static/css. Or there is a misconfiguration when packaging the app with vercel (so the css and js files are not included).
In that case i guess I need to create static folder and place all the files there because i was using public folder
from cookieconsent.
I think because i added these to public folder. It seems doesnt work with Razzle
from cookieconsent.
Hello @Ghaleb-alnakhlani ,
I hope you find a solution for your problem. It seems to be a problem with the deployment via Razzle?. Unfortunately I can't help you with Razzle. So if you have problems with accessing static files after deployment, you might better ask the people at Razzle.
I will close this issue.
If you still have any questions you are welcome to ask or if there are any other problems with our script files you are welcome to open new issues.
Best regards
from cookieconsent.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookieconsent.