#cant connect to the backend (importing)

14 messages · Page 1 of 1 (latest)

kind creek
#

Uncaught TypeError: Failed to resolve module specifier "@tauri-apps/api/core". Relative references must start with either "/", "./", or "../". (it appears on devtools when importing "import { invoke } from '@tauri-apps/api/core';" from the frontend)

molten trellis
#

this typically means you're not using a frontend bundler like vite or webpack which is required to import npm packages.

#

if you prefer not to use one of those you can access the tauri apis via window.__TAURI__.core.whatever

kind creek
#

and it was working

molten trellis
#

is that file perhaps not part of the files vite works on? do other npm imports work?

kind creek
#

idk

#

it was working until i install git

#

i think that others work

#

how can i test this?

#

i am a beginner

kind creek
#

i tested using globalTauri but it exited the same error

kind creek
#

ok

#

it worked