簡體   English   中英

NPM 命令被 Windows 顯示版本中斷

[英]NPM command interupted by Windows displaying version

我有問題。 每次我嘗試使用 npx/npm 命令時,Windows 似乎都會停止它並顯示 windows 版本:

npm/npx 錯誤

或者進入一個已經創建的項目:

npm 開始

這是我的節點和 npm 版本:Npm /npx 節點版本

什么也做不了。 這里嘗試了每個命令的解決方案。

如果您想自定義命令提示符,您可以編輯環境變量或在命令行中使用set prompt ,在命令行help prompt中鍵入此命令,它將顯示此

Changes the cmd.exe command prompt.

PROMPT [text]

  text    Specifies a new command prompt.

Prompt can be made up of normal characters and the following special codes:

  $A   & (Ampersand)
  $B   | (pipe)
  $C   ( (Left parenthesis)
  $D   Current date
  $E   Escape code (ASCII code 27)
  $F   ) (Right parenthesis)
  $G   > (greater-than sign)
  $H   Backspace (erases previous character)
  $L   < (less-than sign)
  $N   Current drive
  $P   Current drive and path
  $Q   = (equal sign)
  $S     (space)
  $T   Current time
  $V   Windows version number
  $_   Carriage return and linefeed
  $$   $ (dollar sign)

If Command Extensions are enabled, the PROMPT command supports
the following additional formatting characters:

  $+   zero or more plus sign (+) characters depending upon the
       depth of the PUSHD directory stack, one character for each
       level pushed.

  $M   Displays the remote name associated with the current drive
       letter or the empty string if the current drive is not a network
       drive.

在您的情況下,我建議使用此命令set PROMPT=$P$_$G 嘗試不同的提示,選擇最適合您的提示。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM