{"action":"created","issue":{"url":"https://api.github.com/repos/prettier/prettier-atom/issues/156","repository_url":"https://api.github.com/repos/prettier/prettier-atom","labels_url":"https://api.github.com/repos/prettier/prettier-atom/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/prettier/prettier-atom/issues/156/comments","events_url":"https://api.github.com/repos/prettier/prettier-atom/issues/156/events","html_url":"https://github.com/prettier/prettier-atom/issues/156","id":226161666,"number":156,"title":"Uncaught Error: ENOENT: no such file or directory, open 'package.json'","user":{"login":"tbillington","id":2771466,"avatar_url":"https://avatars1.githubusercontent.com/u/2771466?v=3","gravatar_id":"","url":"https://api.github.com/users/tbillington","html_url":"https://github.com/tbillington","followers_url":"https://api.github.com/users/tbillington/followers","following_url":"https://api.github.com/users/tbillington/following{/other_user}","gists_url":"https://api.github.com/users/tbillington/gists{/gist_id}","starred_url":"https://api.github.com/users/tbillington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbillington/subscriptions","organizations_url":"https://api.github.com/users/tbillington/orgs","repos_url":"https://api.github.com/users/tbillington/repos","events_url":"https://api.github.com/users/tbillington/events{/privacy}","received_events_url":"https://api.github.com/users/tbillington/received_events","type":"User","site_admin":false},"labels":[{"id":515022983,"url":"https://api.github.com/repos/prettier/prettier-atom/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-05-04T02:10:19Z","updated_at":"2017-05-11T00:38:22Z","closed_at":null,"body":"**Reproduce**:\r\n\r\n1. Run prettier command with open, unsaved .js file.\r\n\r\n**Atom**: 1.16.0 x64\r\n**Electron**: 1.3.13\r\n**OS**: Mac OS X 10.11.6\r\n**Thrown From**: [prettier-atom](https://github.com/prettier/prettier-atom) package 0.30.0\r\n\r\n\r\n### Stack Trace\r\n\r\nUncaught Error: ENOENT: no such file or directory, open 'package.json'\r\n\r\n```\r\nAt fs.js:640\r\n\r\nError: ENOENT: no such file or directory, open 'package.json'\r\n    at Error (native)\r\n    at Object.fs.openSync (fs.js:640:18)\r\n    at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:168:20)\r\n    at Object.fs.readFileSync (fs.js:508:33)\r\n    at Object.fs.readFileSync (ELECTRON_ASAR.js:501:29)\r\n    at /packages/prettier-atom/node_modules/load-json-file/index.js:11:38)\r\n    at Function.module.exports.sync (/packages/prettier-atom/node_modules/read-pkg/index.js:40:25)\r\n    at getDebugInfo (/packages/prettier-atom/dist/helpers.js:200:34)\r\n    at displayDebugInfo (/packages/prettier-atom/dist/displayDebugInfo.js:7:14)\r\n    at /packages/prettier-atom/dist/main.js:57:3)\r\n    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)\r\n    at /app.asar/src/command-registry.js:3:59\r\n    at Object.didConfirmSelection (/app.asar/node_modules/command-palette/lib/command-palette-view.js:106:29)\r\n    at SelectListView.confirmSelection (/app.asar/node_modules/atom-select-list/src/select-list-view.js:292:20)\r\n    at /app.asar/node_modules/atom-select-list/src/select-list-view.js:64:14)\r\n    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)\r\n    at /app.asar/src/command-registry.js:3:59\r\n    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)\r\n    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)\r\n    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)\r\n    at /app.asar/src/window-event-handler.js:3:59)\r\n```\r\n\r\n### Commands\r\n\r\n```\r\n     -1:18.7.0 core:save (input.hidden-input)\r\n  2x -0:58.1.0 core:move-up (input.hidden-input)\r\n     -0:57.7.0 core:move-left (input.hidden-input)\r\n     -0:53.5.0 editor:select-to-end-of-line (input.hidden-input)\r\n     -0:53.5.0 core:select-left (input.hidden-input)\r\n     -0:53.1.0 editor:select-to-beginning-of-word (input.hidden-input)\r\n  2x -0:52.7.0 core:select-left (input.hidden-input)\r\n     -0:52.2.0 core:copy (input.hidden-input)\r\n     -0:52 core:move-right (input.hidden-input)\r\n     -0:51 core:paste (input.hidden-input)\r\n     -0:50.9.0 core:save (input.hidden-input)\r\n     -0:37.7.0 core:cut (input.hidden-input)\r\n     -0:37.6.0 core:save (input.hidden-input)\r\n     -0:10.7.0 command-palette:toggle (input.hidden-input)\r\n     -0:09.6.0 core:confirm (input.hidden-input)\r\n     -0:09.6.0 prettier:debug (input.hidden-input)\r\n```\r\n\r\n### Non-Core Packages\r\n\r\n```\r\nactivate-power-mode 1.4.0 \r\natom-autocomplete-php 0.22.2 \r\natom-beautify 0.29.23 \r\nbusy-signal 1.4.1 \r\ncolor-picker 2.2.5 \r\nfile-icons 2.1.4 \r\ngo-debug 1.3.1 \r\ngo-plus 5.5.1 \r\ngo-signature-statusbar 1.2.0 \r\nhyperclick 0.0.40 \r\nide-purescript 0.17.2 \r\nintentions 1.1.2 \r\nlanguage-docker 1.1.7 \r\nlanguage-elm 1.5.0 \r\nlanguage-javascript-jsx 0.3.7 \r\nlanguage-protobuf 0.7.1 \r\nlanguage-purescript 0.8.2 \r\nlanguage-rust 0.4.10 \r\nlinter 2.1.4 \r\nlinter-eslint 8.1.7 \r\nlinter-flow 5.6.0 \r\nlinter-php 1.3.2 \r\nlinter-rust 0.8.0 \r\nlinter-ui-default 1.2.3 \r\nnuclide 0.223.0 \r\nphp-twig 4.0.0 \r\npigments 0.39.1 \r\nprettier-atom 0.30.0 \r\nracer 0.20.0 \r\nreact 0.16.2 \r\nvim-mode-plus 0.91.0 \r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/prettier/prettier-atom/issues/comments/300650397","html_url":"https://github.com/prettier/prettier-atom/issues/156#issuecomment-300650397","issue_url":"https://api.github.com/repos/prettier/prettier-atom/issues/156","id":300650397,"user":{"login":"tbillington","id":2771466,"avatar_url":"https://avatars1.githubusercontent.com/u/2771466?v=3","gravatar_id":"","url":"https://api.github.com/users/tbillington","html_url":"https://github.com/tbillington","followers_url":"https://api.github.com/users/tbillington/followers","following_url":"https://api.github.com/users/tbillington/following{/other_user}","gists_url":"https://api.github.com/users/tbillington/gists{/gist_id}","starred_url":"https://api.github.com/users/tbillington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbillington/subscriptions","organizations_url":"https://api.github.com/users/tbillington/orgs","repos_url":"https://api.github.com/users/tbillington/repos","events_url":"https://api.github.com/users/tbillington/events{/privacy}","received_events_url":"https://api.github.com/users/tbillington/received_events","type":"User","site_admin":false},"created_at":"2017-05-11T00:38:22Z","updated_at":"2017-05-11T00:38:22Z","body":"I tried uninstalling and reinstalling. When I run format instead of debug, I get this: \r\n\r\n```\r\nprettier-atom failed!\r\n\r\nValidation Error:\r\n  Option \"trailingComma\" must be of type:\r\n    boolean\r\n  but instead received:\r\n    string\r\n  Example:\r\n  {\r\n    \"trailingComma\": false\r\n  }\r\n```"}}
{"actor":{"display_login":"tbillington"}}