Closed Sparkenstein closed 4 years ago
It works fine for me on Manjaro linux. Try with a vue cli project and see if it works there. Tauri was also updated recently, so make sure you are using the latest version by deleting your yarn.lock
/package-lock.json
and reinstalling deps.
It's a weird Issue. I tried your suggestion first, deleted node_modules and yarn.lock, reinstalled deps and still same error above. Then I created entire new app, with standard commands as it's just simple testing code. still same issue. Steps I followed are below:
cargo install tauri-bundler --force
(upgraded bundler from 0.5 to 0.6 I believe)vue create mynewapp
vue add tauri
App.vue
and wrote following in mounted()
hook:
console.log(readDir("."))
If I run this I get same Error I mentioned above.
but weird thing is if I change the code to
console.log(readDir)
I can see the function definition properly.
My cargo.toml
has tauri = { version = "0.5", features = [ "all-api", "edge" ] }
added by vue tauri plugin. yarn tauri info
shows follwing information:
yarn run v1.22.4
$ /home/spark/newapp/node_modules/.bin/tauri info
[tauri]: running info
Operating System - Linux(5.3.0-51-generic) - linux/x64
Node.js environment
Node.js - 12.16.2
tauri.js - 0.6.2
Rust environment
rustc - 1.43.0
cargo - 1.43.0
tauri-bundler - 0.6.0
Global packages
NPM - 6.14.4
yarn - 1.22.4
App directory structure
/.git
/node_modules
/public
/src
/src-tauri
App
tauri - 0.5
mode - embedded-server
build-type - bundle
CSP - default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline'
Windows - Edge
distDir - unset
devPath - unset
Done in 0.67s.
Let me know if you need any more logs or config from my side.
In a similar manner none of the APIs are working for me on windows while running with devmode/HMR with npm run tauri:serve
Yet the the binaries produced by result of npm run tauri:build
work as expected.
Update:, if I'm developing by running both npm run serve
and npx tauri dev
(and not npm run tauri:serve
) everthing works as expected too.
@fedot Good catch.
Can confirm this behaviour. keeping two terminals open for yarn serve
and yarn tauri dev
worked for me. Although running yarn tauri:build
didn't as the AppImage file created by kept giving me exec format error
. But that's a different issue.
Alright, seems like this is a windows-only issue then since I just tried on a fresh linux install and it worked fine. I don't have a working windows install right now, so it may be a few days before I can set that up and then take a look at this.
Just realizing now that you are on linux, idk why I thought windows. But I also tried on windows and it worked fine. I'm not sure why you are getting the issue, but another tauri release has been published so maybe try that.
We're seeing some cases where you have to manually remove src-tauri/target
.
I can confirm it works with the new version
i am using this vue plugin for testing tauri out. Not sure if the issue is with tauri core of this plugin.
I have a simple js file that has following
the default export is just so that I can import this file in my
App.vue
and nothing else. intellisense shows that this code is correct and I can navigate through it as well, but after running it withyarn tauri:serve
I get following errorThis is the entire error unfortunately, there's no stack trace or anything.