🐛 BUG: `wrangler pages dev -- npm run serve` gives an "Unknown argument" error
See original GitHub issueWhat 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:
The command npm run serve
works correctly.
Issue Analytics
- State:
- Created a year ago
- Comments:25 (14 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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.