Uni app series (V): hbuilderx runs the uniapp project to the page, views the preview and solves NPM: the error that the file cannot be loaded

Sunny_ Chen 2021-09-15 09:04:48

Abstract

The state of mind is good , I'm not so tired . I'm in a good mood , All you see is beautiful scenery .

“ A problem that can't be solved at the moment , Then take advantage of this opportunity , See your limitations , Set yourself right .” As the old saying goes , Let go of it , Everything is at home . If you're distracted by something disturbing , Might as well learn to give up . Cut off your wishful thinking , Community garbage mood , Leave negative energy . The state of mind is good , I'm not so tired . I'm in a good mood , All you see is beautiful scenery .

Share today —— HBuilderx function uniapp Project to page and view preview Some basic knowledge , Welcome to your attention !

Welcome to , Summary series : Savage uni-app Way of learning


HBuilderx function uni-app project

The premise of operation shall be scss Compile and parse plug-ins !

  1. See if it is installed sccs plug-in unit : Tools --> Plug in installation  Insert picture description here

  2. If not, you can look at my previous articles and search in the plug-in market scss And install to hbx Insert picture description here

  3. Open a project page , Click... As shown in the figure : function --> Select the browser to run to , Insert picture description here

  4. After successful compilation : Insert picture description here

  5. The running effect is shown below : Insert picture description here


Share npm : Unable to load file D:\nodejs\node_global\npm.ps1, Because scripts are not allowed to run on this system .

PS C:\Users\lenovo\Desktop\ylm-club> npm install axios
npm : Unable to load file D:\nodejs\node_global\npm.ps1, Because scripts are not allowed to run on this system . For more information , see also https:/go.microsoft.
com/fwlink/?LinkID=135170 Medium about_Execution_Policies.
The position of That's ok :1 character : 1
+ npm install axios
+ ~~~
+ CategoryInfo : SecurityError: (:) [],PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
 Copy code 

I'm going to use the just downloaded Hbuilder X to uniapp Project installation axios, As a result, I made such a mistake .

Because scripts are not allowed to run on this system , That means you don't have permission , to glance at :

get-ExecutionPolicy

Output :

Restricted

Restricted , Indicates that the status is prohibited , Then give me permission :

Set-ExecutionPolicy -Scope CurrentUser

Input :

RemoteSigned

 Insert picture description here Install it again !!!

 Insert picture description here

Finally, thank you for your patience to watch , Originality is not easy. , The six likes collection is your greatest encouragement to me !


summary :

  • For more reference, please see here :《 Chen Yongjia's blog 》

  • Friends who like bloggers can pay more attention 、 Like it , Keep updating, hehe !

Please bring the original link to reprint ,thank
Similar articles

2021-09-15

2021-09-15

2021-09-15