[bug] ERROR: Expected identifier but found "import" #12015
Labels
status: needs triage
This issue needs to triage, applied to new issues
status: upstream
This issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes
type: bug
Describe the bug
First time trying Tauri and there is a problem with the basic app it seems like:
failed to load config from /tmp/tauri-app/vite.config.ts
error when starting dev server:
Error: Build failed with 3 errors:
(define name):1:0: ERROR: Expected identifier but found "import"
(define name):1:0: ERROR: Expected identifier but found "import"
(define name):1:0: ERROR: Expected identifier but found "import"
Reproduction
/tmp ❯ sh <(curl https://create.tauri.app/sh)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16121 100 16121 0 0 136k 0 --:--:-- --:--:-- --:--:-- 138k
info: downloading create-tauri-app
✔ Project name · tauri-app
✔ Identifier · com.tauri-app.app
✔ Choose which language to use for your frontend · TypeScript / JavaScript - (pnpm, yarn, npm, deno, bun)
✔ Choose your package manager · deno
✔ Choose your UI template · Vanilla
✔ Choose your UI flavor · TypeScript
Template created! To get started run:
cd tauri-app
deno install
deno task tauri android init
For Desktop development, run:
deno task tauri dev
For Android development, run:
deno task tauri android dev
/tmp took 9s ❯ cd tauri-app
/tmp/tauri-app via v20.11.1 ❯ deno install
/tmp/tauri-app via v20.11.1 ❯ deno task tauri dev
Task tauri tauri "dev"
Running BeforeDevCommand (
deno task dev
)Task dev vite
✘ [ERROR] Expected identifier but found "import"
✘ [ERROR] Expected identifier but found "import"
✘ [ERROR] Expected identifier but found "import"
failed to load config from /tmp/tauri-app/vite.config.ts
error when starting dev server:
Error: Build failed with 3 errors:
(define name):1:0: ERROR: Expected identifier but found "import"
(define name):1:0: ERROR: Expected identifier but found "import"
(define name):1:0: ERROR: Expected identifier but found "import"
at failureErrorWithLog (file:///tmp/tauri-app/node_modules/.deno/esbuild@0.24.1/node_modules/esbuild/lib/main.js:1476:15)
at file:///tmp/tauri-app/node_modules/.deno/esbuild@0.24.1/node_modules/esbuild/lib/main.js:945:25
at runOnEndCallbacks (file:///tmp/tauri-app/node_modules/.deno/esbuild@0.24.1/node_modules/esbuild/lib/main.js:1316:45)
at buildResponseToResult (file:///tmp/tauri-app/node_modules/.deno/esbuild@0.24.1/node_modules/esbuild/lib/main.js:943:7)
at file:///tmp/tauri-app/node_modules/.deno/esbuild@0.24.1/node_modules/esbuild/lib/main.js:970:16
at responseCallbacks. (file:///tmp/tauri-app/node_modules/.deno/esbuild@0.24.1/node_modules/esbuild/lib/main.js:622:9)
at handleIncomingPacket (file:///tmp/tauri-app/node_modules/.deno/esbuild@0.24.1/node_modules/esbuild/lib/main.js:677:12)
at Readable.readFromStdout (file:///tmp/tauri-app/node_modules/.deno/esbuild@0.24.1/node_modules/esbuild/lib/main.js:600:7)
at Readable.emit (ext:deno_node/_events.mjs:393:28)
at addChunk (ext:deno_node/_stream.mjs:2438:16)
Error The "beforeDevCommand" terminated with a non-zero status code.
Expected behavior
That starter app runs on localhost
Full
tauri info
outputStack trace
Additional context
No response
The text was updated successfully, but these errors were encountered: