touch : File C:\Users\AppData\Roaming\npm\touch.ps1 cannot be loaded because running scripts is disabled on this system
P粉905144514
P粉905144514 2024-03-26 14:48:13
0
1
401

I am a beginner learning React and Node.js. When I run touch 'index.js' command in server it shows 'touch : File C:\Users\sandu\AppData\Roaming\npm\touch.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see

about_Execution_Policies is located at https://go.microsoft.com/fwlink/?LinkID=135170. On line: 1 Characters: 1

  • Touch server.js
  • + CategoryInfo          : SecurityError: (:) [], PSSecurityException
      + FullyQualifiedErrorId : UnauthorizedAccess'

%E

P粉905144514
P粉905144514

reply all(1)
P粉384244473

Sanduni It seems you need to set the execution policy to RemoteSigned on Powershell. Just run the following command on powershell.

Set-ExecutionPolicy –ExecutionPolicy RemoteSigned
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!