Skip to content

TS0: error: unexpected argument '*.ts' found #85

@marcoaleixo

Description

@marcoaleixo
➜ deno --version
deno 2.1.9 (stable, release, aarch64-apple-darwin)
v8 13.0.245.12-rusty
typescript 5.6.2
➜ npx wrangler --version

 ⛅️ wrangler 3.107.3
--------------------

main.ts looks like

import { Hono } from "hono";
import { usersRoute } from "./src/api/features/user/routes/user-routes.ts";

const app = new Hono();

app.route("/users", usersRoute);

export default {
    fetch: app.fetch,
};

.denoflare

{
  "$schema": "https://raw.githubusercontent.com/skymethod/denoflare/v0.6.0/common/config.schema.json",
  "scripts": {
    "main": {
      "path": "main.ts",
      "localPort": 8000
    }
  },
  "profiles": {
    "myprofile": {
      "accountId": "key",
      "apiToken": "token"
    }
  }
}

deno.json

{
  "tasks": {
    "start": "deno serve -NRESW --env --watch main.ts",
    "generate": "deno task drizzle-kit generate",
    "migrate": "deno run -A --env ./src/index.ts migrate",
    "drizzle-kit": "deno run --env -A --node-modules-dir npm:drizzle-kit",
    "drizzle-studio": "deno run --env -A drizzle-kit studio"
  },
  "imports": {
    "@drizzle-team/brocli": "npm:@drizzle-team/brocli@^0.11.0",
    "@types/pg": "npm:@types/pg@^8.11.11",
    "drizzle-kit": "npm:drizzle-kit@^0.30.4",
    "drizzle-orm": "npm:drizzle-orm@^0.39.3",
    "hono": "jsr:@hono/hono@^4.6.20",
    "pg": "npm:pg@^8.13.1",
    "postgres": "npm:postgres@^3.4.5",
    "zod": "npm:zod@^3.24.1",
    "youtubei.js": "npm:youtubei.js"
  },
  "fmt": {
    "indentWidth": 2,
    "semiColons": true,
    "useTabs": false,
    "exclude": [
      "node_modules",
      "drizzle",
      "tsconfig.json",
      "README.md",
      ".devcontainer",
      ".vscode"
    ]
  },
  "compilerOptions": {
    "jsx": "precompile",
    "jsxImportSource": "hono/jsx"
  }
}

error

➜  backend-js git:(setup-cloudflare) ✗ denoflare serve main
✅ Granted all import access.
Compiling https://raw.githubusercontent.com/skymethod/denoflare/v0.6.0/cli-webworker/worker.ts into worker contents...
✅ Granted all write access.
TS0: error: unexpected argument '--config' found

Usage: deno bundle [OPTIONS]


  at undefined:
error: Uncaught (in promise) Error: bundle failed
        throw new Error('bundle failed');
              ^
    at bundle (https://raw.githubusercontent.com/skymethod/denoflare/v0.6.0/cli/bundle.ts:108:15)
    at eventLoopTick (ext:core/01_core.js:177:7)
    at async Function.start (https://raw.githubusercontent.com/skymethod/denoflare/v0.6.0/cli/worker_manager.ts:40:43)
    at async createLocalRequestServer (https://raw.githubusercontent.com/skymethod/denoflare/v0.6.0/cli/cli_serve.ts:161:35)
    at async Object.serve [as handler] (https://raw.githubusercontent.com/skymethod/denoflare/v0.6.0/cli/cli_serve.ts:194:32)
    at async CliCommand.routeSubcommand (https://raw.githubusercontent.com/skymethod/denoflare/v0.6.0/cli/cli_command.ts:104:13)
    at async https://raw.githubusercontent.com/skymethod/denoflare/v0.6.0/cli/cli.ts:41:5

Not sure how address this TS0: error: unexpected argument '--config' found or why it's happening

If you have some time can you setup an example of hono + deno + denoflare?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions