-3

I installed vue but I can not create a Vue project, because the following error appears after running the command 'vue create project'. I am using S.O. windows 10 pro.

Error: vue: The file C: \ Users \ leoca \ AppData \ Roaming \ npm \ vue.ps1 cannot be loaded because the script execution was disabled on this system. For more For more information, see about_Execution_Policies at https://go.microsoft.com/fwlink/?LinkID=135170. In line: 1 character: 1 + vue create calculator + ~~~      + CategoryInfo: ErrodeSecurity: (:) []     , PSSecurityException      + FullyQualifiedErrorId: UnauthorizedAccess

What should I do?

ascripter
  • 5,665
  • 12
  • 45
  • 68
Leo
  • 11
  • 2
  • 1
    Does this answer your question? [PowerShell says "execution of scripts is disabled on this system."](https://stackoverflow.com/questions/4037939/powershell-says-execution-of-scripts-is-disabled-on-this-system) – The Fabio Nov 05 '19 at 12:04

2 Answers2

6

Run this in terminal:

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
Martin Brisiak
  • 3,872
  • 12
  • 37
  • 51
user15167359
  • 61
  • 1
  • 2
-4

you can download vue.js file and add it in your project like this

<script type="text/javascript" src="vue.js"></script>

vue.js file link: https://vuejs.org/js/vue.js

MaBbKhawaja
  • 842
  • 10
  • 16
  • This doesn't solve the fact that vue-cli isn't working on the OP's system. – zero298 Nov 05 '19 at 20:45
  • Maybe he does not have administrative rights as there is unauthorized access error – MaBbKhawaja Nov 07 '19 at 03:50
  • Sorry guys, I formulated the wrong answer and then discovered the problem. I had inserted console.log () inside methods in Vue. Then a permission problem occurred in package.json. So I entered package.json, "eslintConfig" and "rules" and entered the following permission: "no-console": "off". For example: "rules": {"no-console": "off"},. Thank you so much for your personal help. – Leo Nov 07 '19 at 12:02