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

質問編集履歴

6

誤字

2022/02/16 01:53

投稿

kodakku
kodakku

スコア1

title CHANGED
File without changes
body CHANGED
@@ -286,7 +286,7 @@
286
286
  $ export PATH=/Applications/MAMP/bin/php/php7.4.21/bin:$PATH
287
287
 
288
288
  ```
289
- しかし、最初は通っていたpathがmampを閉じたらwhich phpやphp -vとしても何も返ってこなくなりました。なぜなのでしょうか...
289
+ しかし、最初は通っていたpathがmampを閉じたら? which phpやphp -vとしても何も返ってこなくなりました。なぜなのでしょうか...
290
290
 
291
291
 
292
292
  昨日から色々調べて試しているのですが、上手くいかず先に進めません。

5

誤字

2022/02/16 01:47

投稿

kodakku
kodakku

スコア1

title CHANGED
@@ -1,1 +1,1 @@
1
- [mac] brackets"PHPランタイムエラー”の解消方法について
1
+ [mac] brackets"JSONエラー”の解消方法について
body CHANGED
File without changes

4

誤字

2022/02/16 01:38

投稿

kodakku
kodakku

スコア1

title CHANGED
File without changes
body CHANGED
@@ -281,7 +281,7 @@
281
281
  Expecting 'EOF', '}', ',', ']', got 'STRING'
282
282
  ```
283
283
 
284
- また、phpのスを通す際に、ターミナルでこのようにしてphpのパスを通しました。
284
+ また、phpのスを通す際に、ターミナルでこのようにしてphpのパスを通しました。
285
285
  ```ここに言語を入力
286
286
  $ export PATH=/Applications/MAMP/bin/php/php7.4.21/bin:$PATH
287
287
 

3

文法の修正

2022/02/16 01:36

投稿

kodakku
kodakku

スコア1

title CHANGED
File without changes
body CHANGED
@@ -1,21 +1,17 @@
1
+ ###実現したいこと
1
- Bracketsを開いた際に、ようなエラーが出ます
2
+ Bracketsを開いた際に、以下のエラーが出ます。このエラーを解消したい。
2
- > 「PHPランタ見つかりません。PHP7ランタムをインストーして、PHPの環境設定で適切に”executablePath”更新してください。これより、コードヒント、パラメーターヒント、定義にジャンプなどのPHP関連のツール有効になります。
3
+ > 環境設定ファ有効なJSONではありません。ファイルが開かれます。フォーマット修正してください。変更を反映するはbracketsを再起動させる必要ります。
3
4
 
5
+ ###試したこと
6
+ JSONエラーチェックにかけたら、元々あったコードにエラー返ってきます。
4
- ミナルでこのようにしてphpのパスを通し
7
+ 追加したコはエラーはありませんでた。
5
- ```ここに言語を入力
6
- $ export PATH=/Applications/MAMP/bin/php/php7.4.21/bin:$PATH
7
8
 
8
- ```
9
-
10
-
11
- Bracketsのbrackets.jsonにこのように記述まし
9
+ <追加したコード>
12
10
  ```ここに言語を入力
13
11
  "php" : { "executablePath": "/Applications/MAMP/bin/php/php7.4.21/bin/php" }
14
12
  ```
15
13
 
16
- JSONエラーが返ってきたので文法チェックツールを使いました
17
-
18
- エラーチェックにかけたコード
14
+ <エラーチェックにかけたコード>
19
15
  ```ここに言語を入力
20
16
  {
21
17
  "brackets-eslint.gutterMarks": true,
@@ -277,7 +273,7 @@
277
273
 
278
274
  }
279
275
  ```
280
-  返ってきたエラー
276
+ <返ってきたエラー>
281
277
  ```ここに言語を入力
282
278
  Error: Parse error on line 9:
283
279
  ...php" } "themes.theme": "dar
@@ -285,10 +281,20 @@
285
281
  Expecting 'EOF', '}', ',', ']', got 'STRING'
286
282
  ```
287
283
 
288
- 元々書かれていコードエラが出いるですがなぜなんでょうか
284
+ 、phpのバスを通す際、タミナルでこのようにしphpパスを通ました
285
+ ```ここに言語を入力
286
+ $ export PATH=/Applications/MAMP/bin/php/php7.4.21/bin:$PATH
287
+
288
+ ```
289
- また、通ずのphpのPATHが消えていて which php としても何も表示せれません。(昨日は通ってました)
289
+ かし、最初通っていたpathがmampを閉じたらwhich phpやphp -vとしても何もってこなくなりました。なぜなのでしょうか...
290
+
291
+
290
292
  昨日から色々調べて試しているのですが、上手くいかず先に進めません。
291
293
 
292
294
  どうかご教授ください。よろしくお願いします。
293
295
 
296
+ ###補足情報
294
297
  実施環境: OS:macOS Monterey Ver 12.1
298
+
299
+
300
+

2

文法の修正

2022/02/16 01:09

投稿

kodakku
kodakku

スコア1

title CHANGED
File without changes
body CHANGED
@@ -1,18 +1,294 @@
1
1
  Bracketsを開いた際に、このようなエラーが出ます
2
- ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-02-15/2d45681d-811c-43d1-abfb-3eacc5ff450e.png)
2
+ > 「PHPランタムが見つかりません。PHP7ランタイムをインストールして、PHPの環境設定で適切に”executablePath”を更新してください。これにより、コードヒント、パラメーターヒント、定義にャンプなどのPHP関連のツールが有効になります。」
3
3
 
4
- 色々調べ、まずphpのパスを通し
4
+ ターミナルでこのようにしてphpのパスを通し
5
+ ```ここに言語を入力
5
- ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-02-15/6add1bf7-ecd7-4181-912b-e952703d6283.jpeg)
6
+ $ export PATH=/Applications/MAMP/bin/php/php7.4.21/bin:$PATH
6
7
 
8
+ ```
9
+
10
+
7
11
  Bracketsのbrackets.jsonにこのように記述しました
12
+ ```ここに言語を入力
8
- ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-02-15/6d63fa46-4753-4a47-9d6e-4c80ab838a7d.png)
13
+ "php" : { "executablePath": "/Applications/MAMP/bin/php/php7.4.21/bin/php" }
14
+ ```
9
15
 
10
- しかし、このようなエラーが発生し
16
+ JSONエラーが返ってきたので文法チェックツールを使いした
11
- ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-02-15/999cfab1-20fb-49a1-adf8-26b99df4bb3a.png)
12
17
 
13
- JSON文法にかけた結果です
18
+ エラーチェックにかけたコード
19
+ ```ここに言語を入力
20
+ {
21
+ "brackets-eslint.gutterMarks": true,
22
+ "brackets-eslint.useLocalESLint": false,
23
+ "fonts.fontSize": "12px",
24
+ "fonts.fontFamily": "'SourceCodePro-Medium', MS ゴシック, 'MS Gothic', monospace",
25
+
26
+ "php" : {
14
- ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-02-16/38c8c63b-d2fe-4265-8d60-226ff9847580.png)
27
+ "executablePath": "/Applications/MAMP/bin/php/php7.4.21/bin/php"
28
+ }
29
+
30
+ "themes.theme": "dark-theme",
31
+ "edc.brackets-snippets.hints": [
32
+ {
33
+ "trigger": "cl",
34
+ "scope": "javascript",
35
+ "description": "console.log",
36
+ "tag": "VanillaJS",
37
+ "tagHide": true,
38
+ "text": "console.log(${1:obj});${2}",
39
+ "source": "system"
40
+ },
41
+ {
42
+ "trigger": "cd",
43
+ "scope": "javascript",
44
+ "description": "console.dir",
45
+ "tag": "VanillaJS",
46
+ "tagHide": true,
47
+ "text": "console.dir(${1:obj});${2}",
48
+ "source": "system"
49
+ },
50
+ {
51
+ "trigger": "ce",
52
+ "scope": "javascript",
53
+ "description": "console.error",
54
+ "tag": "VanillaJS",
55
+ "tagHide": true,
56
+ "text": "console.error(${1:obj});${2}",
57
+ "source": "system"
58
+ },
59
+ {
60
+ "trigger": "cll",
61
+ "scope": "javascript",
62
+ "description": "console.log",
63
+ "tag": "VanillaJS",
64
+ "tagHide": true,
65
+ "text": "console.log('${1:obj}:', ${1:obj});${2}",
66
+ "source": "system"
67
+ },
68
+ {
69
+ "trigger": "cdd",
70
+ "scope": "javascript",
71
+ "description": "console.dir",
72
+ "tag": "VanillaJS",
73
+ "tagHide": true,
74
+ "text": "console.dir('${1:obj}:', ${1:obj});${2}",
75
+ "source": "system"
76
+ },
77
+ {
78
+ "trigger": "cee",
79
+ "scope": "javascript",
80
+ "description": "console.error",
81
+ "tag": "VanillaJS",
82
+ "tagHide": true,
83
+ "text": "console.error('${1:obj}:', ${1:obj});${2}",
84
+ "source": "system"
85
+ },
86
+ {
87
+ "trigger": "ae",
88
+ "scope": "javascript",
89
+ "description": "document.addEventListener",
90
+ "tag": "VanillaJS",
91
+ "tagHide": true,
92
+ "text": "${1:document}.addEventListener('${2:event}', function(e) {\n ${3}\n});",
93
+ "source": "system"
94
+ },
95
+ {
96
+ "trigger": "ac",
97
+ "scope": "javascript",
98
+ "description": "document.appendChild",
99
+ "tag": "VanillaJS",
100
+ "tagHide": true,
101
+ "text": "${1:document}.appendChild(${2:elem});${3}",
102
+ "source": "system"
103
+ },
104
+ {
105
+ "trigger": "rc",
106
+ "scope": "javascript",
107
+ "description": "document.removeChild",
108
+ "tag": "VanillaJS",
109
+ "tagHide": true,
110
+ "text": "${1:document}.removeChild(${2:elem});${3}",
111
+ "source": "system"
112
+ },
113
+ {
114
+ "trigger": "cel",
115
+ "scope": "javascript",
116
+ "description": "document.createElement",
117
+ "tag": "VanillaJS",
118
+ "tagHide": true,
119
+ "text": "${1:document}.createElement(${2:elem});${3}",
120
+ "source": "system"
121
+ },
122
+ {
123
+ "trigger": "gi",
124
+ "scope": "javascript",
125
+ "description": "document.getElementById",
126
+ "tag": "VanillaJS",
127
+ "tagHide": true,
128
+ "text": "${1:document}.getElementById('${2:id}');${3}",
129
+ "source": "system"
130
+ },
131
+ {
132
+ "trigger": "gc",
133
+ "scope": "javascript",
134
+ "description": "document.getElementsByClassName",
135
+ "tag": "VanillaJS",
136
+ "tagHide": true,
137
+ "text": "${1:document}.getElementsByClassName('${2:class}');${3}",
138
+ "source": "system"
139
+ },
140
+ {
141
+ "trigger": "gt",
142
+ "scope": "javascript",
143
+ "description": "document.getElementsByTagName",
144
+ "tag": "VanillaJS",
145
+ "tagHide": true,
146
+ "text": "${1:document}.getElementsByTagName('${2:tag}');${3}",
147
+ "source": "system"
148
+ },
149
+ {
150
+ "trigger": "qs",
151
+ "scope": "javascript",
152
+ "description": "document.querySelector",
153
+ "tag": "VanillaJS",
154
+ "tagHide": true,
155
+ "text": "${1:document}.querySelector('${2:selector}');${3}",
156
+ "source": "system"
157
+ },
158
+ {
159
+ "trigger": "qsa",
160
+ "scope": "javascript",
161
+ "description": "document.querySelectorAll",
162
+ "tag": "VanillaJS",
163
+ "tagHide": true,
164
+ "text": "${1:document}.querySelectorAll('${2:selector}');${3}",
165
+ "source": "system"
166
+ },
167
+ {
168
+ "trigger": "fe",
169
+ "scope": "javascript",
170
+ "description": "forEach",
171
+ "tag": "VanillaJS",
172
+ "tagHide": true,
173
+ "text": "${1:myArray}.forEach(function (${2:elem}) {\n ${3}\n});",
174
+ "source": "system"
175
+ },
176
+ {
177
+ "trigger": "fi",
178
+ "scope": "javascript",
179
+ "description": "for in",
180
+ "tag": "VanillaJS",
181
+ "tagHide": true,
182
+ "text": "for (${1:prop} in ${2:obj}) {\n if (${2:obj}.hasOwnProperty(${1:prop})) {\n ${3}\n }\n}",
183
+ "source": "system"
184
+ },
185
+ {
186
+ "trigger": "fn",
187
+ "scope": "javascript",
188
+ "description": "function",
189
+ "tag": "VanillaJS",
190
+ "tagHide": true,
191
+ "text": "function ${1:methodName} (${2:arguments}) {\n ${3}\n}",
192
+ "source": "system"
193
+ },
194
+ {
195
+ "trigger": "afn",
196
+ "scope": "javascript",
197
+ "description": "anonymous function",
198
+ "tag": "VanillaJS",
199
+ "tagHide": true,
200
+ "text": "function (${1:arguments}) {\n ${2}\n}",
201
+ "source": "system"
202
+ },
203
+ {
204
+ "trigger": "pr",
205
+ "scope": "javascript",
206
+ "description": "prototype",
207
+ "tag": "VanillaJS",
208
+ "tagHide": true,
209
+ "text": "${1:ClassName}.prototype.${2:methodName} = function (${3:arguments}) {\n ${4}\n};",
210
+ "source": "system"
211
+ },
212
+ {
213
+ "trigger": "sw",
214
+ "scope": "javascript",
215
+ "description": "switch statement",
216
+ "tag": "VanillaJS",
217
+ "tagHide": true,
218
+ "text": "switch(${1:expression}) {\n case ${2:value}:\n ${3}\n break;\n default:\n break;\n}",
219
+ "source": "system"
220
+ },
221
+ {
222
+ "trigger": "si",
223
+ "scope": "javascript",
224
+ "description": "setInterval",
225
+ "tag": "VanillaJS",
226
+ "tagHide": true,
227
+ "text": "setInterval(function() {\n ${2}\n}, ${1:delay});",
228
+ "source": "system"
229
+ },
230
+ {
231
+ "trigger": "st",
232
+ "scope": "javascript",
233
+ "description": "setTimeout",
234
+ "tag": "VanillaJS",
235
+ "tagHide": true,
236
+ "text": "setTimeout(function() {\n ${2}\n}, ${1:delay});",
237
+ "source": "system"
238
+ },
239
+ {
240
+ "trigger": "for",
241
+ "scope": "php",
242
+ "description": "for",
243
+ "text": "for ($i = ${1:init}; $i < ${2:length}; $i++)\n{\n ${3}\n}",
244
+ "source": "system"
245
+ },
246
+ {
247
+ "trigger": "if",
248
+ "scope": "php",
249
+ "description": "if",
250
+ "text": "if (${1:condition})\n{\n ${2}\n}",
251
+ "source": "system"
252
+ },
253
+ {
254
+ "trigger": "ifelse",
255
+ "scope": "php",
256
+ "description": "if else",
257
+ "text": "if (${1:condition})\n{\n ${2}\n}\nelse\n{\n ${3}\n}",
258
+ "source": "system"
259
+ }
260
+ ],
261
+ "bb.beautify.onSave": false,
262
+ "custom.work.useIconsOfCustomWork": true,
263
+ "custom.work.blueish": true,
264
+ "custom.work.moveToolbarToSidebar": true,
265
+ "custom.work.autoHideTheTabmenu": true,
266
+ "custom.work.halfcircle.sidebar": true,
267
+ "denniskehrig.ShowWhitespace.checked": true,
268
+ "externalApplications": {
269
+ "jpg": "Preview",
270
+ "jpeg": "Preview",
271
+ "png": "Preview",
272
+ "svg": "Brackets",
273
+ "psd": "Adobe Photoshop CC 2019",
274
+ "ai": "Adobe Photoshop CC 2019"
275
+ }
276
+
15
277
 
278
+ }
279
+ ```
280
+  返ってきたエラー
16
- どうかご教授ください。
281
+ ```ここに言語を入力
282
+ Error: Parse error on line 9:
283
+ ...php" } "themes.theme": "dar
284
+ --------------------^
285
+ Expecting 'EOF', '}', ',', ']', got 'STRING'
286
+ ```
17
287
 
288
+ 元々書かれていたコードにエラーが出ているのですがなぜなんでしょうか。
289
+ また、通したはずのphpのPATHが消えていて which php としても何も表示せれません。(昨日は通っていました)
290
+ 昨日から色々調べて試しているのですが、上手くいかず先に進めません。
291
+
292
+ どうかご教授ください。よろしくお願いします。
293
+
18
294
  実施環境: OS:macOS Monterey Ver 12.1

1

JSON文法にかけた結果を追加します

2022/02/15 23:57

投稿

kodakku
kodakku

スコア1

title CHANGED
File without changes
body CHANGED
@@ -10,6 +10,9 @@
10
10
  しかし、このようなエラーが発生します
11
11
  ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-02-15/999cfab1-20fb-49a1-adf8-26b99df4bb3a.png)
12
12
 
13
+ JSON文法にかけた結果です
14
+ ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-02-16/38c8c63b-d2fe-4265-8d60-226ff9847580.png)
15
+
13
16
  どうかご教授ください。
14
17
 
15
18
  実施環境: OS:macOS Monterey Ver 12.1