json-server : File C:\Users\ADMIN\AppData\Roaming\npm\json-server.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
+ json-server --watch db.json
+ ~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Asked
Active
Viewed 1,832 times
0

mc-user
- 1,769
- 4
- 14
- 25

sahil shaikh
- 1
- 3
-
You need to set execution policies. I think this might help you https://stackoverflow.com/questions/4037939/powershell-says-execution-of-scripts-is-disabled-on-this-system – mc-user Aug 10 '22 at 10:07
2 Answers
2
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

jinfeng wang
- 21
- 2
-
1As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 20 '22 at 04:57
0
- cd/your vs code file
- npm install -g json-server
- npx json-server --watch api/db.json your file .json api.db.json mine ..

4b0
- 21,981
- 30
- 95
- 142