Ner*_*avP 0 visual-studio-code
我对编码非常陌生,目前正在学习 Javascript。我似乎无法从 VSCode 的终端打开 liveserver。
我收到以下消息:
////
live-server : The term 'live-server' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:1
+ live-server
+ ~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (live-server:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
////
Run Code Online (Sandbox Code Playgroud)
请帮忙。
谢谢
小智 7
首先,您应该验证是否安装了node.js。
node -v
Run Code Online (Sandbox Code Playgroud)
然后安装live-server包:
npm install -g live-server
Run Code Online (Sandbox Code Playgroud)
如果您仍然遇到与(...ps1 无法加载,因为在此系统上禁用运行脚本...)相关的问题,请在 powershell 中运行此脚本:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12661 次 |
| 最近记录: |