#TypeError: undefined is not an object (evaluating 'window.__TAURI_OS_PLUGIN_INTERNALS__.platform')

16 messages · Page 1 of 1 (latest)

ivory seal
#

I've read the instructions on how to upgrade from Tauri v2 beta to Tauri v2.. I'm having issues with the platform plugin specifically. On the console, it's giving me this issue.

I've tried removing the node_modules folder, clearing the yarn cache then reinstalling packages.

random nexus
#

youve gotta provide some code

#

make sure your permissions are correct

ivory seal
#

yeah, I added os:default to the permissions. These as well

        "os:default",
        "os:allow-arch",
        "os:allow-hostname",
        "os:allow-os-type",
        "os:allow-platform",

random nexus
#

my brother, i want to help but you've given me little to work with

ivory seal
#

ah, got it

#

hold on

random nexus
#

please explain how to replicate the issue you're having

#

additionally, please provide the output of tauri info

ivory seal
#

got it

#

So after I migrated from tauri v2 beta to tauri v2.. I'm getting this error.. The errors are from when I try to use the plugin os package, for example

import { Platform, platform as obtainPlatform } from '@tauri-apps/plugin-os';

const p = obtainPlatform();


console.log("Platform: ", p);
random nexus
ivory seal
#

resolved this just used

const { platform: obtainPlatform } = window.__TAURI__.os;

instead