question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tauri fs APIs not working

See original GitHub issue

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

import { readDir } from "tauri/api/fs";

readDir(".").then(d => {
    console.log(d)
})

export default 1;

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 with yarn tauri:serve I get following error

CONSOLE LOG [HMR] Waiting for update signal from WDS...
undefined:73:56: CONSOLE ERROR TypeError: undefined is not an object (evaluating '_tauri__WEBPACK_IMPORTED_MODULE_0__["default"].readDir')
CONSOLE INFO Download the Vue Devtools extension for a better development experience:

This is the entire error unfortunately, there’s no stack trace or anything.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
nklaymancommented, Jun 23, 2020

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.

1reaction
nothingismagickcommented, Jun 23, 2020

We’re seeing some cases where you have to manually remove src-tauri/target.

Read more comments on GitHub >

github_iconTop Results From Across the Web

fs
This module prevents path traversal, not allowing absolute paths or parent dir components (i.e. "/usr/path/to/file" or "../path/to/file" paths are not allowed).
Read more >
tauri-apps/api
@tauri-apps/api. Modules​. app · cli · clipboard · dialog · event · fs · globalShortcut · http · mocks · notification · os...
Read more >
Embedding Additional Files
It supports glob patterns in case you need to include multiple files from a directory. Here is a sample to illustrate the configuration....
Read more >
dialog
Native system dialogs for opening and saving files.
Read more >
Configuration
Enables the transparent background API and sets the fullScreenEnabled preference ... when it's not in focus https://github.com/tauri-apps/tauri/issues/4316.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found