DevEnv for Node.js
Installing Node.js
Download and install Node.js from here: [https://nodejs.org/en/download/].
Change the Execution Policy
We firsts want to install the node dependencies. Following the Readme.md we try to run
npm install
This results in the following error output:
npm : File C:\Program Files\nodejs\npm.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.
This is because of Execution Policy. This defines how powershell scripts will run.
In Default windows desktops, it is Restricted, not allowing any scripts (signed or unsigned) only interactive sessions.
So best is you set using RemoteSigned (Default on Windows Server) letting only signed scripts from remote and unsigned in local to run, but Unrestriced is insecure lettting all scripts to run.
To set run Set-ExecutionPolicy -ExecutionPolicy RemoteSigned as administrator.
After this, we can finally run npm install.
Running the App
After running npm install we can run the website locally as follows:
npm run dev