Replies: 10 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..
|
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
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.. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Could you confirm which version of npm you are using? I think this |
Beta Was this translation helpful? Give feedback.
-
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) |
Beta Was this translation helpful? Give feedback.
-
Despite the fault apparently being with Thanks for your help. |
Beta Was this translation helpful? Give feedback.
-
@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.. |
Beta Was this translation helpful? Give feedback.
-
@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) |
Beta Was this translation helpful? Give feedback.
-
@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. 👍 |
Beta Was this translation helpful? Give feedback.
-
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!
Beta Was this translation helpful? Give feedback.
All reactions