FWeinb / rclone-js

Encrypt/Decrypt files in your browser
76 stars 15 forks source link

ReferenceError: atob is not defined #1

Closed neckaros closed 6 years ago

neckaros commented 6 years ago

Hello, Thanks for this great library. i'm encoutering the following stack on NodeJS v8.5.0:

ReferenceError: atob is not defined
    at base64 (c:\Devs\rs-api\node_modules\rclone\dist\reveal.js:53:3)
    at reveal (c:\Devs\rs-api\node_modules\rclone\dist\reveal.js:32:15)
    at generateKeys (c:\Devs\rs-api\node_modules\rclone\dist\rclone.js:60:37)
    at c:\Devs\rs-api\node_modules\rclone\dist\rclone.js:28:7
    at Promise (<anonymous>)
    at Rclone (c:\Devs\rs-api\node_modules\rclone\dist\rclone.js:23:10)
    at Object.Rclone (c:\Devs\rs-api\node_modules\rclone\dist\index.js:21:29)
neckaros commented 6 years ago

Adding those lines at the begining of reveal.js: if (typeof atob === 'undefined') { global.atob = function (b64Encoded) { return new Buffer(b64Encoded, 'base64').toString('binary'); }; } solved the issue

FWeinb commented 6 years ago

Yeah running it on node was not my first priority. Thanks for reporting and suggesting a fix.

FWeinb commented 6 years ago

:tada: This issue has been resolved in version 1.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: