Skip to content

TypeError: configPath.endsWith is not a function #36

Description

@saeedesmaili

Running npx localflare I'm getting:

✗ Wrangler exited with code 1

Logs:

--- 2026-01-25T10:16:21.507Z debug
Failed to parse config. Disabling metrics dispatcher. TypeError: configPath.endsWith is not a function
    at parseRawConfigFile (/Volumes/w/code/test-project/node_modules/wrangler/wrangler-dist/cli.js:6307:22)
    at Object.experimental_readRawConfig (/Volumes/w/code/test-project/node_modules/wrangler/wrangler-dist/cli.js:6317:25)
    at /Volumes/w/code/test-project/node_modules/wrangler/wrangler-dist/cli.js:275064:51
    at /Volumes/w/code/test-project/node_modules/wrangler/wrangler-dist/cli.js:147124:22
    at Array.reduce (<anonymous>)
    at applyMiddleware (/Volumes/w/code/test-project/node_modules/wrangler/wrangler-dist/cli.js:147112:22)
    at CommandInstance.applyMiddlewareAndGetResult (/Volumes/w/code/test-project/node_modules/wrangler/wrangler-dist/cli.js:147475:34)
    at CommandInstance.runCommand (/Volumes/w/code/test-project/node_modules/wrangler/wrangler-dist/cli.js:147383:216)
    at [runYargsParserAndExecuteCommands] (/Volumes/w/code/test-project/node_modules/wrangler/wrangler-dist/cli.js:150205:96)
    at YargsInstance.parse (/Volumes/w/code/test-project/node_modules/wrangler/wrangler-dist/cli.js:149542:63)
---

I'm using wrangler.jsonc but I get the same error when trying npx localflare wrangler.jsonc. How can I troubleshoot this? I'm using wrangler dev for running my project without any issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions