teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

誤字修正

2020/10/22 03:52

投稿

Noboru_Ryu
Noboru_Ryu

スコア4

title CHANGED
File without changes
body CHANGED
@@ -1,6 +1,6 @@
1
1
  【状況】
2
2
  create-react-appで環境構築を行っています。
3
- Linuxbrewを使ってnodebrewと安定バージョンのv14.4のnodeをインストールしました。
3
+ Linuxbrewを使ってnodebrewと安定バージョンのv14.14.0のnodeをインストールしました。
4
4
  nodeを使える状態にするため、環境Pathを通そうとしたとき、誤ってシェルがbashでない方の環境Pathを通してしまい、それ以降node-vどころか、今まで受け付けていたコマンドも「コマンドが見つかりません」と出るようになりました。
5
5
 
6
6
  原因や解決法が分かる方がいれば、ご教授お願いします。

3

試したことに追記

2020/10/22 03:52

投稿

Noboru_Ryu
Noboru_Ryu

スコア4

title CHANGED
File without changes
body CHANGED
@@ -8,8 +8,11 @@
8
8
  【試したこと】
9
9
  ・bashの環境Pathを通し、再起動を行いましたが結果は変わらず。
10
10
  ・sudo apt update 等の環境Pathがいらなさそうなコマンドは受け付けました。
11
+ ・もう一度brewなどをインストールし直そうとすると、コマンド”brew”が見つかりません。
12
+  次を試してみてください: sudo apt install <deb name>
13
+  と表示されます。brewが拡張子debのファイルなのかわからないので、今のところは上記のコマンド
14
+  は試してはいません。
11
15
 
12
-
13
16
  【PC環境】
14
17
   ・Windows10
15
18
   ・WSL

2

微修正

2020/10/22 01:59

投稿

Noboru_Ryu
Noboru_Ryu

スコア4

title CHANGED
File without changes
body CHANGED
@@ -16,7 +16,7 @@
16
16
   ・bash
17
17
   ・curl、gitインストール済み
18
18
   
19
- 該当するソースコード
19
+ 環境変数PATHの内容
20
20
  ```Ubuntu
21
21
  /home/tatsumip/.nodebrew/current/bin:/home/tatsumip/.nodebrew/current/bin:/home/tatsumip/.nod
22
22
  ebrew/current/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/us
@@ -28,8 +28,10 @@
28
28
  ram Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn/:/mnt/c/Users/USER/AppData/Loca
29
29
  l/Microsoft/WindowsApps:/snap/bin
30
30
  ```
31
-
31
+ 【エラー直前に通した環境PATH】
32
32
  ```Ubuntu
33
+ bash
33
- シェルがbashの場合 echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.bash_profile
34
+ echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.bash_profile
35
+ bash以外 
34
- bash以外     echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.zprofile
36
+ echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.zprofile
35
37
  ```

1

環境PATHの内容追加

2020/10/22 01:41

投稿

Noboru_Ryu
Noboru_Ryu

スコア4

title CHANGED
File without changes
body CHANGED
@@ -18,6 +18,18 @@
18
18
   
19
19
  【該当するソースコード】
20
20
  ```Ubuntu
21
+ /home/tatsumip/.nodebrew/current/bin:/home/tatsumip/.nodebrew/current/bin:/home/tatsumip/.nod
22
+ ebrew/current/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/us
23
+ r/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_2004.202
24
+ 0.812.0_x64__79rhkp1fndgsc:/mnt/d/Shingo Library/WEBサーバー/bin/:/mnt/c/Program Files (x86)/
25
+ NVIDIA Corporation/PhysX/Common:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System3
26
+ 2/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/
27
+ c/Program Files/dotnet/:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn/:/mnt/c/Prog
28
+ ram Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn/:/mnt/c/Users/USER/AppData/Loca
29
+ l/Microsoft/WindowsApps:/snap/bin
30
+ ```
31
+
32
+ ```Ubuntu
21
33
  シェルがbashの場合 echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.bash_profile
22
34
  bash以外     echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.zprofile
23
35
  ```