Live-Server使用
PS D:\web001\vue001> live-server
live-server : 無(wú)法將“l(fā)ive-server”項(xiàng)識(shí)別為 cmdlet、函數(shù)、腳本文件或可運(yùn)行程序的名稱。請(qǐng)檢查名稱的拼寫,如果包括路徑,請(qǐng)確保路徑正確,然后再試一次。
所在位置 行:1 字符: 1
+ live-server
+ ~~~~~~~~~~~
? ? + CategoryInfo ? ? ? ? ?: ObjectNotFound: (live-server:String) [], CommandNotFoundException
? ? + FullyQualifiedErrorId : CommandNotFoundException
?
PS D:\web001\vue001> npm install -g live-server
npm WARN deprecated opn@6.0.0: The package has been renamed to `open`
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated uuid@3.4.0: Please upgrade ?to version 7 or higher. ?Older versions may use Math.random() in certain circumstances, which is known to be problematic. ?See https://v8.dev/blog/math-random for details.
D:\node\node-v14.19.0-win-x64\live-server -> D:\node\node-v14.19.0-win-x64\node_modules\live-server\live-server.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\live-server\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ live-server@1.2.2
added 195 packages from 149 contributors in 44.98s
PS D:\web001\vue001> live-server
live-server : 無(wú)法加載文件 D:\node\node-v14.19.0-win-x64\live-server.ps1,因?yàn)樵诖讼到y(tǒng)上禁止運(yùn)行腳本。有關(guān)詳細(xì)信息,請(qǐng)參閱 https:/go.microsoft.com/fwlink/?LinkID=13
5170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1
+ live-server
+ ~~~~~~~~~~~
? ? + CategoryInfo ? ? ? ? ?: SecurityError: (:) [],PSSecurityException
? ? + FullyQualifiedErrorId : UnauthorizedAccess
PS D:\web001\vue001> set-ExecutionPolicy RemoteSigned
set-ExecutionPolicy : 對(duì)注冊(cè)表項(xiàng)“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell”的訪問被拒絕。 要更改默認(rèn)(LocalMachine)作用域的
執(zhí)行策略,請(qǐng)使用“以管理員身份運(yùn)行”選項(xiàng)啟動(dòng) Windows PowerShell。要更改當(dāng)前用戶的執(zhí)行策略,請(qǐng)運(yùn)行 "Set-ExecutionPolicy -Scope CurrentUser"。
所在位置 行:1 字符: 1
+ set-ExecutionPolicy RemoteSigned
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
? ? + CategoryInfo ? ? ? ? ?: PermissionDenied: (:) [Set-ExecutionPolicy], UnauthorizedAccessException
? ? + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand
PS D:\web001\vue001> Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
PS D:\web001\vue001> live-server
Serving "D:\web001\vue001" at http://127.0.0.1:8080
Ready for changes
GET /favicon.ico 404 3.955 ms - 150
GET /favicon.ico 404 1.370 ms - 150
PS D:\web001\vue001> live-server --port 9000
Serving "--port" at http://127.0.0.1:8080
Ready for changes
GET / 404 9.740 ms - 139
PS D:\web001\vue001> live-server --help
Usage: live-server [-v|--version] [-h|--help] [-q|--quiet] [--port=PORT] [--host=HOST] [--open=PATH] [--no-browser] [--browser=BROWSER] [--ignore=PATH] [--ignorePattern=RGXP] [--no-css-inject] [--entry-file=PATH] [--spa] [--mount=ROUTE:PATH] [--wait=MILLISECONDS] [--htpasswd=PATH] [--cors] [--https=PATH] [--https-module=MODULE_NAME] [--proxy=PATH] [PATH]
PS D:\web001\vue001> live-server -h
Usage: live-server [-v|--version] [-h|--help] [-q|--quiet] [--port=PORT] [--host=HOST] [--open=PATH] [--no-browser] [--browser=BROWSER] [--ignore=PATH] [--ignorePattern=RGXP] [--no-css-inject] [--entry-file=PATH] [--spa] [--mount=ROUTE:PATH] [--wait=MILLISECONDS] [--htpasswd=PATH] [--cors] [--https=PATH] [--https-module=MODULE_NAME] [--proxy=PATH] [PATH]
PS D:\web001\vue001> live-server --port=10010
Serving "D:\web001\vue001" at http://127.0.0.1:10010
Ready for changes
GET /favicon.ico 404 2.854 ms - 150
?
總結(jié)
以上是生活随笔為你收集整理的Live-Server使用的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Git: 'not something
- 下一篇: 【Pluto SDR】简单模拟通信系统