Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

yarn tauri:build checks wrong dist dir for legacy-assets-index.html.json #45

Open
anna-is-cute opened this issue Oct 20, 2021 · 5 comments

Comments

@anna-is-cute
Copy link

Describe the bug
Running yarn tauri:build fails while yarn build works fine. It seems that the build CLI is looking for legacy-assets-index.html.json in normal dist path instead of at src-tauri/target/webpack_dist. The file is present in the latter location.

⠏  Building module bundle for production...node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[Error: ENOENT: no such file or directory, open '/home/ascclemens/code/xivchat-cross-platform/dist/legacy-assets-index.html.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/ascclemens/code/xivchat-cross-platform/dist/legacy-assets-index.html.json'
}

To Reproduce
Steps to reproduce the behavior:

  • Run yarn tauri:build

Expected behavior
The build works.

Environment (please complete the following information):

  • vue-cli-plugin-tauri version: 1.0.0-beta.6
  • other vue plugins used: vue-cli-plugin-svg 0.2.1
  • output from npx tauri info/yarn tauri info:
Operating System - Fedora, version 34 X64

Node.js environment
 Node.js - 16.11.0                                                                                               
 @tauri-apps/cli - 1.0.0-beta.10                                                                                 
 @tauri-apps/api - 1.0.0-beta.8                                                                                  
                                                                                                                 
Global packages                                                                                                   
 npm - 8.0.0
 yarn - 1.22.15

Rust environment
 rustc - 1.57.0-nightly
 cargo - 1.57.0-nightly

App directory structure
/.git
/src-tauri
/.idea
/node_modules
/nix
/public
/src

App
 tauri.rs - 1.0.0-beta.8
 build-type - bundle
 CSP - default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-
src: 'self'
 distDir - Set automatically by Vue CLI plugin
 devPath - Set automatically by Vue CLI plugin
 framework - Vue.js (Vue CLI)
 bundler - Webpack
@nklayman
Copy link
Member

Sorry I never responded to this, was taking a break from open source during school. Are you still having this issue? If so, could you provide a bit more info as to how I could reproduce the error? A github repo that demonstrates the error would be even better.

@LLFourn
Copy link

LLFourn commented Mar 16, 2022

This is still an issue. All that is required to reproduce is:

vue create my-app
cd my-app
vue add tauri
yarn tauri:build
yarn list |grep tauri
├─ @tauri-apps/cli-darwin-arm64@1.0.0-rc.4
├─ @tauri-apps/cli-darwin-x64@1.0.0-rc.4
├─ @tauri-apps/cli-linux-arm-gnueabihf@1.0.0-rc.4
├─ @tauri-apps/cli-linux-arm64-gnu@1.0.0-rc.4
├─ @tauri-apps/cli-linux-arm64-musl@1.0.0-rc.4
├─ @tauri-apps/cli-linux-x64-gnu@1.0.0-rc.4
├─ @tauri-apps/cli-linux-x64-musl@1.0.0-rc.4
├─ @tauri-apps/cli-win32-x64-msvc@1.0.0-rc.4
├─ @tauri-apps/cli@1.0.0-rc.4
│  ├─ @tauri-apps/cli-darwin-arm64@1.0.0-rc.4
│  ├─ @tauri-apps/cli-darwin-x64@1.0.0-rc.4
│  ├─ @tauri-apps/cli-linux-arm-gnueabihf@1.0.0-rc.4
│  ├─ @tauri-apps/cli-linux-arm64-gnu@1.0.0-rc.4
│  ├─ @tauri-apps/cli-linux-arm64-musl@1.0.0-rc.4
│  ├─ @tauri-apps/cli-linux-x64-gnu@1.0.0-rc.4
│  ├─ @tauri-apps/cli-linux-x64-musl@1.0.0-rc.4
│  └─ @tauri-apps/cli-win32-x64-msvc@1.0.0-rc.4
├─ vue-cli-plugin-tauri@1.0.0-rc.1
│  ├─ @tauri-apps/cli@1.0.0-rc.4

@xingBaGan
Copy link

I also encountered this issue, but i ran the yarn run tauri:build --skip-bundle command. It works.
rustup 1.24.3 (ce5817a94 2021-05-31)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active rustc version is `rustc 1.59.0 (9d1b2106e 2022-02-23)

vue-cli-plugin-tauri@~1.0.0-rc.1:
version "1.0.0-rc.1"
resolved "https://registry.npmmirror.com/vue-cli-plugin-tauri/-/vue-cli-plugin-tauri-1.0.0-rc.1.tgz#31eed8c3a8ac40879a259f07810f83d452eca04d"
integrity sha512-mt7RqC4GfIILYanfPG1+0ddPXp0aLTyVYEuF7zKtTpXd+uaRHJbs9o7s4x1uxOOotTHU8CJnAFO4+HUlay1K3g==
dependencies:
"@tauri-apps/cli" "1.0.0-rc.4"
"@vue/cli-shared-utils" "^4.1.1"

node v16.0.0

@jerryzhangjq
Copy link

I also encountered this issue

@RtthLvr
Copy link

RtthLvr commented Apr 19, 2022

add outputDir: 'src-tauri/target/webpack_dist' to your vue.config.js would be worked

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants