Open meganindya opened 2 years ago
I am on it.
Without Docker setup in windows is running fine. But the specific versions are not installed.
To install the specific versions, there are some problems-
tsc -v
.
There is this error-
tsc : File C:\Users\akshu\AppData\Roaming\npm\tsc.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
There is some windows Power shell Execution Policies and the Default is Restricted. Although it can be changed by simply excuting 1 command (reference). But these Execution Policies are for security reasons and changing them might create problem for the user.FIX CAN BE- No need to check the versions of installed scripts or warning the user about changing execution policies.
for Windows, a few alternatives exist, which are neither supported nor developed by us
FIX CAN BE-
v14.17.0
is pretty old dated and current stable version is v16.14.0
.
OR3) &&
is not a valid statement separator in windows so checking installations node -v && npm -v && tsc -v && ts-node -v && http-server -v
will give error.
@meganindya can you once check which typescript are you using, because installing the requirements using this command will install the latest versions.
npm i -g http-server
npm i -g typescript
npm i -g ts-node
&&
works on PowerShell which is now considered as the main CLI for windows, cmd is dramatically inferior is just there for backward compatibility and I think most devs on windows use PowerShell with ExecutionPolicy RemoteSigned
or something that lets them run scripts.
We can just put a disclaimer to use PowerShell instead of cmd and use node v14.17.0
in docs and say that you need ExecutionPolicy RemoteSigned
to run scripts if they run into this problem and link them to this page.
I am using Poweshell only, &&
is not supported there also.
@impAkshat what version of PowerShell are you running? Check with this $PSVersionTable
.
This looks like PowerShell 5, it works in PowerShell 7.
Right I am using version 5.
PowerShell 5 is very old, you should install PowerShell 7 latest version. That will work well.
We should use Node v16. The workflows all run on Node v16.
http-server
, typescript
, and ts-node
at the global level aren't for the app. http-server
can serve built files as an extra measure. If users have python installed, then can also run python3 -m http.server --bind 127.0.0.1 8080
(this command runs on unix-like systems). typescript
and ts-node
are also extra executables in case user wants to transpile
or run a .ts
script while developing. None of these are required by the app. typescript
dependency used by the app is different from the global executable.
As for node
, installing nodejs executable should install npm as well. I'm not sure about the installation paths on Windows.
@meganindya What should we add to the docs? There does not seem to be many problems for windows other than the ExecutionPolicy
error and the &&
error in older versions of PowerShell. Should we just add these two points into the documentation?
Is this issue currently opened?
Description
The "Setup Development Environment" section is geared towards BASH-like shells. The guide is good for Linux distros and MacOS. However, on Windows, there might be differences. Update the guide to accommodate Windows installations.