Solved! Express.ps1 cannot be loaded because running scripts is disabled on this system.
Express. js is a Node js web application server framework, which is specifically designed for building single-page, multi-page, and hybrid web applications. It has become the standard server framework for node. js.
When I created a new app using node.js and express.js there was a problem as shown below :
express : File C:\Users\Its a Man\AppData\Roaming\npm\express.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.
At line:1 char:1
+ express --view=ejs wp-express
+ CategoryInfo : SecurityError: (:) , PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
After trying various ways I finally came across several references that managed to solve this problem.
Solving this problem is quite easy, you only need to delete the express.ps1 file in the express.js installation folder. If you see in my case, the location of the express.ps1 file is in this folder :
C: \ Users \ Its a Man \ AppData \ Roaming \ npm \ express.ps1
- Go to the folder C: \ Users \ nameuser \ AppData \ Roaming \ npm \
- Then delete the express.ps1 file.
If so, please repeat the command to run or create an engine in express.js, like the example image below:
Good friends like that is the material that I can share in this article, which is about Solved! Express.ps1 cannot be loaded because running scripts is disabled on this system.
Thank you for visiting and reading my writing, apologize if there are errors, please correct them by commenting.
express.ps1 cannot be loaded