touch :無法載入檔案 C:\Users\AppData\Roaming\npm\touch.ps1,因為在此系統上停用執行腳本
P粉905144514
P粉905144514 2024-03-26 14:48:13
0
1
342

我是學習 React 和 Node.js 的初學者。當我在伺服器中運行 touch 'index.js' 命令時,它顯示 'touch :無法載入檔案 C:\Users\sandu\AppData\Roaming\npm\touch.ps1,因為在此系統上停用了執行腳本。欲了解更多信息,請參閱

about_Execution_Policies 位於 https://go.microsoft.com/fwlink/?LinkID=135170。 在行:1 字元:1

  • 觸碰server.js
  • + CategoryInfo          : SecurityError: (:) [], PSSecurityException
      + FullyQualifiedErrorId : UnauthorizedAccess'
##%2
P粉905144514
P粉905144514

全部回覆(1)
P粉384244473

Sanduni 似乎您需要在 Powershell 上將執行策略設為 RemoteSigned。只需在 powershell 上執行以下命令即可。

Set-ExecutionPolicy –ExecutionPolicy RemoteSigned
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!