lucianoratamero / sveltekit-capacitor-sample

26 stars 5 forks source link

ReferenceError: document is not defined #2

Open joejarlett opened 2 years ago

joejarlett commented 2 years ago

when running compiles, however when visiting http://localhost:3000/ in the browser I get the following error

C:\Users\joe\Documents\web\dev\sveltekit-capacitor-sample\node_modules\@capacitor\app\dist\plugin.cjs.js:20
        document.addEventListener('visibilitychange', this.handleVisibilityChange, false);
        ^

ReferenceError: document is not defined
    at new AppWeb (C:\Users\joe\Documents\web\dev\sveltekit-capacitor-sample\node_modules\@capacitor\app\dist\plugin.cjs.js:20:9)
    at C:\Users\joe\Documents\web\dev\sveltekit-capacitor-sample\node_modules\@capacitor\app\dist\plugin.cjs.js:8:78
    at async loadPluginImplementation (C:\Users\joe\Documents\web\dev\sveltekit-capacitor-sample\node_modules\@capacitor\core\dist\index.cjs.js:158:47)
error Command failed with exit code 1.

Any pointers?

NelsonDJCR commented 9 months ago

same problem 😞