DEV Community

Discussion on: Creating an API using AdonisJS (part 1)

Collapse
 
minamotoo profile image
Minamotoo • Edited

hello, i got a problem when i try to run npm install or npm install --save mysql(i use mysql as my db) after i created my project and set things in my .env file, and whatever on the internet cant help me. because i am very new to this so i cant tell how to describe my issue but the error said that


found 6 vulnerabilities (1 low, 1 moderate, 4 high)
run npm audit fix to fix them, or npm audit for details
PS D:\Works\Adonis-Project\test-controller> adonis migration:run
adonis : File D:\Users\4416\AppData\Roaming\npm\adonis.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

  • adonis migration:run + ~~~~~~
    • CategoryInfo : SecurityError: (:) [], PSSecurityException
    • FullyQualifiedErrorId : UnauthorizedAccess

actually i 've run "audit fix --force" too but it's nothing, i've added my error picture here too, please check and help me it will be a great appreciation. thank you. link here >> thepracticaldev.s3.amazonaws.com/i...

edited: after i got this issue, i tried to install the older nodejs version (v 8.16.2) because it's the only way i know how to fix but it didnt work out. sorry for my bad english but really hope you can help.

Collapse
 
matheusvsmpimentel profile image
MatheusVSMPimentel

Minamotoo Do you have using a CMD or PowerShell to texting the command Adonis migration:run? Try to use the CMD from windows. This issue happen because security params in power shell. See this post on stackoverflow: superuser.com/questions/106360/how...

Collapse
 
badasscoder profile image
Badasscoder

Set-ExecutionPolicy Unrestricted -Scope Process

run this command before npm