Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node gives error btoa is not defined #38

Open
ehudettun opened this issue Sep 18, 2021 · 0 comments
Open

Node gives error btoa is not defined #38

ehudettun opened this issue Sep 18, 2021 · 0 comments

Comments

@ehudettun
Copy link

ehudettun commented Sep 18, 2021

Solved by replacing in index.js:

[url('data:image/svg+xml;base64,${btoa('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2" fill-opacity="0.2"><rect x="1" width="1" height="1"/><rect y="1" width="1" height="1"/></svg>')'),"center center / 16px 16px","repeat","#fff"]

to

[url('data:image/svg+xml;base64,${Buffer.from('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2" fill-opacity="0.2"><rect x="1" width="1" height="1"/><rect y="1" width="1" height="1"/></svg>').toString()}'),"center center / 16px 16px","repeat","#fff"]

Hope that helps anyone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant