Maggiekegebi
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # NVM-Windows 使用指南 ## 簡介 NVM-Windows 的主要功能是讓使用者在同一台電腦上管理和切換多個版本的 Node.js。這對於開發者來說非常有用,因為不同的專案可能需要使用不同版本的 Node.js。 ## 安裝步驟 1. 進入 [nvm-windows/github](https://github.com/coreybutler/nvm-windows) 2. 捲動到下方看到 NVM for Windows 3. 點擊 Download Now! ![Download Now!](https://hackmd.io/_uploads/BycBgBgAke.png) 4. 依照最新版本下載: ![下載 nvm](https://hackmd.io/_uploads/H1qhergCJg.png) 5. 下載後,一路按下一步直到安裝完成 ## 基本使用 ### 確認安裝版本 開啟命令提示字元(cmd),輸入: ``` nvm -v ``` ![查看版本](https://hackmd.io/_uploads/Hk2eZrgRkg.png) ### 查看可用的 Node.js 版本 ``` nvm list available ``` ![Node.js版本](https://hackmd.io/_uploads/S1bIWBg0kl.png) ### 安裝指定版本的 Node.js 可以依照自己公司所使用的專案需求,來安裝指定版本的 Node.js: ``` nvm install 版本號 ``` 例如:`nvm install 20.19.0` ![安裝 Node.js](https://hackmd.io/_uploads/SkiZfSeAye.png) ### 切換使用的 Node.js 版本 ``` nvm use 版本號 ``` 例如:`nvm use 20.19.0` ![切換版本](https://hackmd.io/_uploads/HJTEMSeAJg.png) ### 確認當前 Node.js 與 npm 版本 ``` node -v npm -v ``` ![確認 Node.js 及 npm 版本](https://hackmd.io/_uploads/B10QmBlA1x.png) > **說明**: > - **Node.js**:一個開源、跨平台的 JavaScript 執行環境,它讓開發者能夠在伺服器端執行 JavaScript 程式碼。在 Node.js 出現之前,JavaScript 主要只能在網頁瀏覽器中運行。 > - **npm**:Node Package Manager 的縮寫,它是 Node.js 的預設套件管理工具。 ### 卸載 Node.js 版本 ``` nvm uninstall 版本號 ``` 例如:`nvm uninstall 22.14.0` ![卸載 Node.js 版本](https://hackmd.io/_uploads/Sy3CEBgCye.png) ### 什麼是npm i? 1. 用 `npm i` 安裝的模組無法用 `npm uninstall` 刪除,用 `npm uninstall i` 才卸載掉。 2. `npm i` 會幫助檢測與當前 Node 版本最匹配的 npm 包版本號,並匹配出相互依賴的 npm 包應該提升的版本號。 3. 部分 npm 包在當前 Node 版本下無法使用,必須使用建議版本。 4. 安裝報錯時必定會出現 npm-debug.log 文件,而 `npm i` 不一定會出現。 ## 常用指令 ### 版本管理與安裝 - `nvm list` 或 `nvm ls` - 列出所有已安裝的 Node.js 版本 - `nvm list available` - 列出可供安裝的 Node.js 版本 - `nvm install latest` - 安裝最新版本的 Node.js - `nvm install lts` - 安裝最新的 LTS(長期支援,Long Term Support)版本 ### 使用與切換版本 - `nvm use <version>` - 切換到指定版本的 Node.js,例如 `nvm use 14.17.0` - `nvm current` - 顯示當前使用的 Node.js 版本 ### 設定預設版本 - `nvm alias default <version>` - 設定預設使用的 Node.js 版本 - `nvm alias <name> <version>` - 為特定版本創建一個別名 ### 路徑管理 - `nvm root` - 顯示 nvm 安裝路徑 - `nvm node_mirror <url>` - 設定 Node.js 鏡像 - `nvm npm_mirror <url>` - 設定 npm 鏡像 ### 其他操作 - `nvm version` - 顯示 nvm-windows 的版本 - `nvm on` - 啟用 Node.js 版本管理 - `nvm off` - 停用 Node.js 版本管理 - `nvm proxy [url]` - 設定代理伺服器 - `nvm arch [32|64]` - 顯示或設定 Node.js 架構(32位或64位) ## 常見使用情境 1. 安裝並切換到特定版本: ``` nvm install 20.19.0 nvm use 20.19.0 ``` 2. 設定預設版本: ``` nvm alias default 16.14.0 ``` 3. 在多個專案間快速切換 Node.js 版本: ``` cd 專案A nvm use 20.19.0 cd 專案B nvm use 20.18.3 ``` ## 注意事項 在使用 `nvm use` 時必須指定版本號,否則會出現 "activation error: A version argument is required but missing" 的錯誤。 ![錯誤訊息](https://hackmd.io/_uploads/SkKdrHgCkg.png) 透過 NVM-Windows,你可以在 Windows 系統上有效地管理多個 Node.js 版本,以滿足不同專案的需求。 ## Reference [@ray102467-nvm-windows 管理 Windows Node.js 版本](https://medium.com/@ray102467/nvm-windows-%E7%AE%A1%E7%90%86-windows-node-js-%E7%89%88%E6%9C%AC-68d789cf84d7)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully