question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

🐛 BUG: `wrangler pages dev -- npm run serve` gives an "Unknown argument" error

See original GitHub issue

What version of Wrangler are you using?

2.0.2

What operating system are you using?

Windows

Describe the Bug

I am currently giving WebStorm a try and I am encountering a problem when running the command below: wrangler pages dev --proxy 8080 -- npm run serve

Indeed, when this command is executed via a classic Command Prompt, everything works fine, but when it is executed from PowerShell, the following error is displayed: error

The command npm run serve works correctly.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:25 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
petebacondarwincommented, May 18, 2022

I am not sure why the behaviour is different between command prompts. I guess different prompts pass the args in in different ways at the OS level?? Anyway, my PR (#1057) should be a reliable fix across all, and is arguably the right way to do this anyway.

1reaction
Flotsscommented, May 13, 2022
  • npx wrangler pages dev --proxy 8080 -- npm run serve

I just tried starting wrangler with npx, and the command works just fine when doing so. The command only fails when running wrangler using the wrangler command.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[wrangler 2.0.5] Devtools is broken on a newly ... - GitHub
Describe the bug. After creating a new typescript worker with npx wrangler init , and running npm start with no changes, devtools fails...
Read more >
Wrangler commands - Cloudflare Workers docs
The wrangler dev command that establishes a connection between localhost and a Cloudflare server that hosts your Worker in development.
Read more >
Cloudflare pages worker error when running wrangler dev
I'm following this tutorial (to get cloudflare pages working with fauna ... wrangler dev 🌀 Running npm run build > fauna-demo-workers@1.0.0 ...
Read more >
node: bad option: --openssl-legacy-provider - You.com
I ran into this on MacOS. From terminal, I ran export to check my environment variables and saw that NODE_OPTIONS=--openssl-legacy-provider had been set....
Read more >
wrangler 1.19.13 - Docs.rs
This is simpler than `wrangler dev ... truncated [jyn514]: ... poorly with workers-sites projects, causing `npm install` to not be run, breaking the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found