-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot launch via Windows (Powershell or Command prompt) #377
Comments
Hey @jakobo thanks for the bug report and additional info.
Files in this repo have a colon in the name?
Is this what you did in order to get it to work? Definitely make a PR for this if that is the case and we'll merge it 👍 |
Checkout
Resolution #!/usr/bin/env node
const { spawn } = require("child_process");
spawn(/^win/.test(process.platform) ? 'npm.cmd' : 'npm', ["start"], { stdio: "inherit", cwd: `${__dirname}/..` }); I'll be able to get a PR in tomorrow when I get WSL fixed on my windows box which doesn't care about |
Resolves an issue where in powershell "npm" is not a valid command, and uses the correct "npm.cmd" executable instead. Test plan ran since checkout on windows has issues: * install globally via npm install -g urql-devtools * cd into the AppData/roaming directory for node_modules * make change directly to the cli.js file * launch using the global bin command "urql-devtools" Fixes: urql-graphql#377
Hey @jakobo This could be due to |
Going to close for now as @JoviDeCroock confirmed he was able to run this fine on Windows once the path was set up. Let us know if you still have issues after making that amendment 👍 |
Can confirm it doesn't work, even though Alternatively, instead of switching between
Some reference on the long-standing annoyance. Based on that thread, the |
I start the devtools from Powershell using
|
The fix is merged, but there isn’t a release yet with the fix included. For now, you can edit the cli.js file in your global node_modules to apply one of the above fixes. Hopefully a patch release comes out soon with the change |
Just pushed v2.6.3 - this should now be resolved 👍 |
About
Devtools cannot be launched from windows
Reproduction
npx urql-devtools
from a PowerShell promptnpx urql-devtools
from a Command promptExpected result
Actual result
Additional info
The likely cause is that we're spawning with
npm
instead ofnpm.cmd
on windows inside ofcli.js
Edit: Workaround: Since several repo filenames have a colon in them
:
, you can't check out the repo on windows. However, I was able to editcli.js
directly to verify this was the issue by doing annpm i -g urql-devtools
and editing the files on disk. With this change, the devtools can be launched without npxurql-devtools
powershell.exe adb reverse tcp:7700 tcp:7700 && powershell.exe urql-devtools
The text was updated successfully, but these errors were encountered: