###実現したいこと
Bracketsを開いた際に、以下のエラーが出ます。このエラーを解消したい。
環境設定ファイルが有効なJSONではありません。ファイルが開かれます。フォーマットを修正してください。変更を反映するにはbracketsを再起動させる必要があります。
###試したこと
JSONエラーチェックにかけたら、元々あったコードにエラー返ってきます。
追加したコードにはエラーはありませんでした。
<追加したコード>
"php" : { "executablePath": "/Applications/MAMP/bin/php/php7.4.21/bin/php" }
<エラーチェックにかけたコード>
{ "brackets-eslint.gutterMarks": true, "brackets-eslint.useLocalESLint": false, "fonts.fontSize": "12px", "fonts.fontFamily": "'SourceCodePro-Medium', MS ゴシック, 'MS Gothic', monospace", "php" : { "executablePath": "/Applications/MAMP/bin/php/php7.4.21/bin/php" } "themes.theme": "dark-theme", "edc.brackets-snippets.hints": [ { "trigger": "cl", "scope": "javascript", "description": "console.log", "tag": "VanillaJS", "tagHide": true, "text": "console.log(${1:obj});${2}", "source": "system" }, { "trigger": "cd", "scope": "javascript", "description": "console.dir", "tag": "VanillaJS", "tagHide": true, "text": "console.dir(${1:obj});${2}", "source": "system" }, { "trigger": "ce", "scope": "javascript", "description": "console.error", "tag": "VanillaJS", "tagHide": true, "text": "console.error(${1:obj});${2}", "source": "system" }, { "trigger": "cll", "scope": "javascript", "description": "console.log", "tag": "VanillaJS", "tagHide": true, "text": "console.log('${1:obj}:', ${1:obj});${2}", "source": "system" }, { "trigger": "cdd", "scope": "javascript", "description": "console.dir", "tag": "VanillaJS", "tagHide": true, "text": "console.dir('${1:obj}:', ${1:obj});${2}", "source": "system" }, { "trigger": "cee", "scope": "javascript", "description": "console.error", "tag": "VanillaJS", "tagHide": true, "text": "console.error('${1:obj}:', ${1:obj});${2}", "source": "system" }, { "trigger": "ae", "scope": "javascript", "description": "document.addEventListener", "tag": "VanillaJS", "tagHide": true, "text": "${1:document}.addEventListener('${2:event}', function(e) {\n ${3}\n});", "source": "system" }, { "trigger": "ac", "scope": "javascript", "description": "document.appendChild", "tag": "VanillaJS", "tagHide": true, "text": "${1:document}.appendChild(${2:elem});${3}", "source": "system" }, { "trigger": "rc", "scope": "javascript", "description": "document.removeChild", "tag": "VanillaJS", "tagHide": true, "text": "${1:document}.removeChild(${2:elem});${3}", "source": "system" }, { "trigger": "cel", "scope": "javascript", "description": "document.createElement", "tag": "VanillaJS", "tagHide": true, "text": "${1:document}.createElement(${2:elem});${3}", "source": "system" }, { "trigger": "gi", "scope": "javascript", "description": "document.getElementById", "tag": "VanillaJS", "tagHide": true, "text": "${1:document}.getElementById('${2:id}');${3}", "source": "system" }, { "trigger": "gc", "scope": "javascript", "description": "document.getElementsByClassName", "tag": "VanillaJS", "tagHide": true, "text": "${1:document}.getElementsByClassName('${2:class}');${3}", "source": "system" }, { "trigger": "gt", "scope": "javascript", "description": "document.getElementsByTagName", "tag": "VanillaJS", "tagHide": true, "text": "${1:document}.getElementsByTagName('${2:tag}');${3}", "source": "system" }, { "trigger": "qs", "scope": "javascript", "description": "document.querySelector", "tag": "VanillaJS", "tagHide": true, "text": "${1:document}.querySelector('${2:selector}');${3}", "source": "system" }, { "trigger": "qsa", "scope": "javascript", "description": "document.querySelectorAll", "tag": "VanillaJS", "tagHide": true, "text": "${1:document}.querySelectorAll('${2:selector}');${3}", "source": "system" }, { "trigger": "fe", "scope": "javascript", "description": "forEach", "tag": "VanillaJS", "tagHide": true, "text": "${1:myArray}.forEach(function (${2:elem}) {\n ${3}\n});", "source": "system" }, { "trigger": "fi", "scope": "javascript", "description": "for in", "tag": "VanillaJS", "tagHide": true, "text": "for (${1:prop} in ${2:obj}) {\n if (${2:obj}.hasOwnProperty(${1:prop})) {\n ${3}\n }\n}", "source": "system" }, { "trigger": "fn", "scope": "javascript", "description": "function", "tag": "VanillaJS", "tagHide": true, "text": "function ${1:methodName} (${2:arguments}) {\n ${3}\n}", "source": "system" }, { "trigger": "afn", "scope": "javascript", "description": "anonymous function", "tag": "VanillaJS", "tagHide": true, "text": "function (${1:arguments}) {\n ${2}\n}", "source": "system" }, { "trigger": "pr", "scope": "javascript", "description": "prototype", "tag": "VanillaJS", "tagHide": true, "text": "${1:ClassName}.prototype.${2:methodName} = function (${3:arguments}) {\n ${4}\n};", "source": "system" }, { "trigger": "sw", "scope": "javascript", "description": "switch statement", "tag": "VanillaJS", "tagHide": true, "text": "switch(${1:expression}) {\n case ${2:value}:\n ${3}\n break;\n default:\n break;\n}", "source": "system" }, { "trigger": "si", "scope": "javascript", "description": "setInterval", "tag": "VanillaJS", "tagHide": true, "text": "setInterval(function() {\n ${2}\n}, ${1:delay});", "source": "system" }, { "trigger": "st", "scope": "javascript", "description": "setTimeout", "tag": "VanillaJS", "tagHide": true, "text": "setTimeout(function() {\n ${2}\n}, ${1:delay});", "source": "system" }, { "trigger": "for", "scope": "php", "description": "for", "text": "for ($i = ${1:init}; $i < ${2:length}; $i++)\n{\n ${3}\n}", "source": "system" }, { "trigger": "if", "scope": "php", "description": "if", "text": "if (${1:condition})\n{\n ${2}\n}", "source": "system" }, { "trigger": "ifelse", "scope": "php", "description": "if else", "text": "if (${1:condition})\n{\n ${2}\n}\nelse\n{\n ${3}\n}", "source": "system" } ], "bb.beautify.onSave": false, "custom.work.useIconsOfCustomWork": true, "custom.work.blueish": true, "custom.work.moveToolbarToSidebar": true, "custom.work.autoHideTheTabmenu": true, "custom.work.halfcircle.sidebar": true, "denniskehrig.ShowWhitespace.checked": true, "externalApplications": { "jpg": "Preview", "jpeg": "Preview", "png": "Preview", "svg": "Brackets", "psd": "Adobe Photoshop CC 2019", "ai": "Adobe Photoshop CC 2019" } }
<返ってきたエラー>
Error: Parse error on line 9: ...php" } "themes.theme": "dar --------------------^ Expecting 'EOF', '}', ',', ']', got 'STRING'
また、phpのパスを通す際に、ターミナルでこのようにしてphpのパスを通しました。
$ export PATH=/Applications/MAMP/bin/php/php7.4.21/bin:$PATH
しかし、最初は通っていたpathがmampを閉じたら? which phpやphp -vとしても何も返ってこなくなりました。なぜなのでしょうか...
昨日から色々調べて試しているのですが、上手くいかず先に進めません。
どうかご教授ください。よろしくお願いします。
###補足情報
実施環境: OS:macOS Monterey Ver 12.1
回答1件
あなたの回答
tips
プレビュー
2022/02/15 23:48
2022/02/15 23:50
2022/02/15 23:54
2022/02/15 23:58
2022/02/16 00:37
2022/02/16 01:13
2022/02/16 01:30
2022/02/16 01:42
2022/02/16 02:07
2022/02/16 02:33