如何从 VSCode 中的终端打开实时服务器?
How to open live server from the terminal in VSCode?
我对编码还很陌生,目前正在学习 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
////
请帮忙。
谢谢
首先,您应该验证 node.js 是否已安装。
node -v
然后安装 live-server
软件包:
npm install -g live-server
如果您仍然遇到与 (....ps1 无法加载,因为 运行ning 脚本在此系统上被禁用.....) 运行 相关的问题Powershell 中的脚本:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
祝你好运!
installing live server
restricted access to run script
我对编码还很陌生,目前正在学习 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
////
请帮忙。
谢谢
首先,您应该验证 node.js 是否已安装。
node -v
然后安装 live-server
软件包:
npm install -g live-server
如果您仍然遇到与 (....ps1 无法加载,因为 运行ning 脚本在此系统上被禁用.....) 运行 相关的问题Powershell 中的脚本:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
祝你好运! installing live server restricted access to run script