tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
81.61k stars 2.44k forks source link

[bug] Onboarding new user with incorrect command #3279

Closed endel closed 2 years ago

endel commented 2 years ago

Describe the bug

When creating a new tauri app via npm init tauri-app ./my-app, the final step says:

>> Updating "tauri.conf.json"
>> Running final command(s)

    Your installation completed.

    $ cd tauri
    $ npm run tauri --dev

Though, the npm run tauri --dev command is incorrect. It should be npm run tauri dev instead.

Reproduction

This is the output I get when running the suggested npm run tauri --dev command:

❯ npm run tauri --dev

> my-tauri-app@0.1.0 tauri
> tauri

      :oooodddoooo;     ;oddl,      ,ol,       ,oc,  ,ldoooooooc,    ,oc,
      ';;;cxOx:;;;'    ;xOxxko'     :kx:       lkd,  :xkl;;;;:okx:   lkd,
          'dOo'       'oOd;:xkc     :kx:       lkd,  :xx:     ;xkc   lkd,
          'dOo'       ckx:  lkx;    :kx:       lkd,  :xx:     :xkc   lkd,
          'dOo'      ;xkl   ,dko'   :kx:       lkd,  :xx:.....xko,   lkd,
          'dOo'     'oOd,    :xkc   :kx:       lkd,  :xx:,;cokko'    lkd,
          'dOo'     ckk:      lkx;  :kx:       lkd,  :xx:    ckkc    lkd,
          'dOo'    ;xOl        lko; :xkl;,....;oOd,  :xx:     :xkl'  lkd,
          'okl'    'kd'        'xx'  'dxxxddddxxo'   :dd;      ;dxc  'xo'

Description
This is the Tauri CLI
Usage
$ tauri dev|build|init|info|sign|icon|deps
Options
--help, -h     Displays this message
--version, -v  Displays the Tauri CLI version

Expected behavior

The output should display the correct command instead, which does work:

    $ npm run tauri dev

Platform and versions

Operating System - Mac OS, version 11.4.0 X64

Node.js environment
  Node.js - 16.1.0
  @tauri-apps/cli - 1.0.0-beta.10
  @tauri-apps/api - 1.0.0-beta.8

Global packages
  npm - 7.11.2
  yarn - 1.22.10

Rust environment
  rustc - 1.58.0
  cargo - 1.58.0

App directory structure
/node_modules
/public
/src-tauri
/.git
/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 - ../build
  devPath - http://localhost:3000
  framework - React

Stack trace

No response

Additional context

No response

FabianLars commented 2 years ago

This is fixed in the next branch: #2555. Thanks for reporting it.