質問編集履歴

2

各種コマンドの結果とsettings.jsonの内容を追記致しました。

2022/08/07 03:10

投稿

sheep0808
sheep0808

スコア16

test CHANGED
File without changes
test CHANGED
@@ -55,5 +55,98 @@
55
55
  ---
56
56
  以上です。宜しくお願い致します。
57
57
 
58
+ ### 追加対応
59
+
60
+ 頂いたアドバイスを基に幾つか他のコマンドを実行しました。
61
+
62
+ 【Powershell単体】
63
+ $PSHOME
64
+ ```
65
+ C:\Program Files\PowerShell\7
66
+ ```
67
+
68
+ $PSVersionTable
69
+ ```
70
+ Name Value
71
+ ---- -----
72
+ PSVersion 7.2.4
73
+ PSEdition Core
74
+ GitCommitId 7.2.4
75
+ OS Microsoft Windows 10.0.19043
76
+ Platform Win32NT
77
+ PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
78
+ PSRemotingProtocolVersion 2.3
79
+ SerializationVersion 1.1.0.1
80
+ WSManStackVersion 3.0
81
+ ```
58
82
 
59
83
 
84
+ $env:path.split(";") | select-string node
85
+ ```
86
+ C:\Program Files\nodejs\
87
+ ```
88
+
89
+ gcm node
90
+ ```
91
+ CommandType Name Version Source
92
+ ----------- ---- ------- ------
93
+ Application node.exe 16.16.0.0 C:\Program Files\nodejs\node.exe
94
+ ```
95
+
96
+ ---
97
+
98
+ 【VScode内ターミナル(Powershell)】
99
+ $PSHOME
100
+ ```
101
+ C:\Program Files\PowerShell\7
102
+ ```
103
+
104
+ $PSVersionTable
105
+ ```
106
+ Name Value
107
+ ---- -----
108
+ PSVersion 7.2.4
109
+ PSEdition Core
110
+ GitCommitId 7.2.4
111
+ OS Microsoft Windows 10.0.19043
112
+ Platform Win32NT
113
+ PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
114
+ PSRemotingProtocolVersion 2.3
115
+ SerializationVersion 1.1.0.1
116
+ WSManStackVersion 3.0
117
+ ```
118
+ $env:path.split(";") | select-string node
119
+ ```
120
+ ${workspaceRoot}\node_modules\.bin
121
+ ```
122
+
123
+ gcm node
124
+ ```
125
+ Get-Command: The term 'node' is not recognized as a name of a cmdlet, function, script file, or executable program.
126
+ Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
127
+ ```
128
+
129
+ ---
130
+ settings.json
131
+ ```
132
+ {
133
+ "terminal.integrated.env.windows": {
134
+ "PATH": "${workspaceRoot}\\node_modules\\.bin;${env:PATH}"
135
+ },
136
+ "terminal.integrated.automationShell.windows": "",
137
+ "terminal.integrated.shell.windows": "",
138
+ "terminal.integrated.automationShell.linux": "",
139
+
140
+ "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
141
+ "explorer.confirmDelete": false,
142
+ "explorer.confirmDragAndDrop": false,
143
+ "python.defaultInterpreterPath": "C:\\Users\\hogehoge\\AppData\\Local\\Programs\\Python\\Python39\\python.exe",
144
+ "workbench.editorAssociations": {
145
+ "*.ipynb": "jupyter.notebook.ipynb"
146
+ },
147
+ "workbench.editor.untitled.hint": "hidden",
148
+ "security.workspace.trust.untrustedFiles": "open",
149
+ "editor.autoIndent": "none",
150
+ "editor.unicodeHighlight.nonBasicASCII": false,
151
+ ```
152
+

1

実行したコマンドとエラー内容を追記しました。

2022/08/06 17:37

投稿

sheep0808
sheep0808

スコア16

test CHANGED
File without changes
test CHANGED
@@ -7,7 +7,13 @@
7
7
  解決策を教えて頂きたいです。
8
8
 
9
9
  ### 発生している問題・エラーメッセージ
10
+ 【Powershell単体でnode -vを実行した場合】
11
+ ```
12
+ PS C:\Users\hoge> node -v
13
+ v16.16.0
14
+ ```
10
15
 
16
+ 【VScode内ターミナル(Powershell)でnode -vを実行した場合】
11
17
  ```
12
18
  node : 用語 'node' は、コマンドレット、関数、スクリプト ファイル、または操作可能なプログ
13
19
  ラムの名前として認識されません。名前が正しく記述されていることを確認し、パスが含まれてい
@@ -18,6 +24,15 @@
18
24
  + CategoryInfo : ObjectNotFound: (node:String) [], CommandNotFoundException
19
25
  + FullyQualifiedErrorId : CommandNotFoundException
20
26
  ```
27
+ →再起動後【VScode内ターミナル(Powershell)でnode -vを実行した場合】
28
+
29
+ ```
30
+ PS C:\Users\hoge> node -v
31
+ node: The term 'node' is not recognized as a name of a cmdlet, function, script file, or executable program.
32
+ Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
33
+ ```
34
+
35
+
21
36
 
22
37
  ### 考えたこと・試したこと
23
38