-
Notifications
You must be signed in to change notification settings - Fork 88
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Rewrite rules stopped working from npx on Windows #158
Comments
Hi, can you confirm which shell you are using? I just ran the following command in both Git Bash and cmd on Windows 10 - everything worked correctly, as expected..
|
I think I was using crd.exe, although I likely used the default shell in vs code as well. I noticed you’re not running it via npx. Could that be why it works for you? |
It could be an issue with npx or other Windows shells, then.. If you're having npx issues, this should work as an alternative:
Closing, as the issue is not with local-web-server itself.. |
I had the same issue on Windows, but fixed it with the workaround @75lb suggested. (although I needed to use backslashes rather than forward slashes) Example:
So it appears the npx utility is not correctly handling either the quotes or the arrow. May be worth linking to this thread in the readme, for Windows users. |
Could you confirm which version of npm you are using? I think this |
Ah, I am using NPM v6.14.5; the PR does look like it might fix it. Unfortunately I don't have the motivation to confirm that at this point. (I don't want to risk ruining something in my npm dependency trees) Because I can't confirm the issue for the latest versions (and because the linked PR probably fixes it), I'm fine with this issue being reclosed unless/until someone else can confirm it's still present in NPM v7.4.0+. (since there's a workaround for now anyway) |
Despite the fault apparently being with Thanks for your help. |
@kenlyon can you confirm this is still an issue with the lastest npm? As i posted above, this issue was apparently fixed in npm v7.4.0.. |
@75lb I can confirm that it does indeed work. Based on the Previous Releases page for node/npm, I confirmed it was still an issue with node 15.51.1 / npm 7.3.0. However, the next release (node 15.6.0 / npm 7.4.0) worked fine. It's not really a viable solution for my use case, though, because we're using the LTS version and it wouldn't be trivial to switch to the "Current" track at this time. As I mentioned above, I'm fine with using the separate config file. In addition, I confirmed it's still a problem in the latest LTS version. (node 14.17.0 / npm 6.14.13) |
@kenlyon ok, thanks for confirming.. I have added a note to the top of the rewrite tutorial as suggested and will leave this issue open for a while. 👍 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I'm running on windows 10. I used to be able to supply command-line parameters for rewrite rules but today I ran into problems.
Windows is interpreting the ">" character in the rewrite rule as being the option to redirect output to a separate file, like you would here:
The most basic case that shows this is:
The response I get is "Access is denied." which is Windows complaining about trying to write to /b.
There doesn't seem to be a way to escape the
>
character, so I've opted to use alws.config.js
config file instead, which solves the problem.I'd suggest adding something about this to your wiki, as the Rewrite tutorial only mentions Windows needing double quotes instead of single quotes while in my case none of the inline examples work. It'd help others avoid the troubleshooting I had to go through.
Otherwise, I think your module is really useful. Thanks for making it!
The text was updated successfully, but these errors were encountered: