-1

`PS H:\BlockChain\dev\VS Code\ethereum\web> truffle init truffle : File C:\Users\PC-NAME\AppData\Roaming\npm\truffle.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.`

3 Answers3

1

try using --> npx truffle init , for initiating project npx truffle compile , for compilation, it worked in my case

Chris Catignani
  • 5,040
  • 16
  • 42
  • 49
SMK
  • 11
  • 2
0

Run this command in windows power shell >> 'Set-ExecutionPol[enter image description here][1]icy RemoteSigned -Scope CurrentUser'

0

1. Run PowerShell as an administrator
2. After that run the following command:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

3.Then run the command for truffle: npm install -g truffle

Now everything will work perfectly including (truffle init).Though I recommend you to use truffle unbox instead of truffle init

If you still get errors then let me know. I have different solutions in it.