Uncaught TypeError: atom.project.getRootDirectory is not a function
Closed this issue · 1 comments
steadyops-dev commented
[Enter steps to reproduce below:]
- Try to run php-cs-fixer
Atom Version: 1.0.19
System: Microsoft Windows 7 Home Premium
Thrown From: command-palette package, v0.36.0
Stack Trace
Uncaught TypeError: atom.project.getRootDirectory is not a function
At /C:/Users/mneimne/github/php-cs-fixer/lib/php-cs-fixer.coffee:45
TypeError: atom.project.getRootDirectory is not a function
at Object.module.exports.PhpCsFixer.toggle (C:\Users\mneimne\github\php-cs-fixer\lib\php-cs-fixer.coffee:37:30)
at atom-workspace.subscriptions.add.atom.commands.add.php-cs-fixer:toggle (C:\Users\mneimne\github\php-cs-fixer\lib\php-cs-fixer.coffee:20:87)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\mneimne\AppData\Local\atom\app-1.0.19\resources\app.asar\src\command-registry.js:245:29)
at C:\Users\mneimne\AppData\Local\atom\app-1.0.19\resources\app.asar\src\command-registry.js:3:61
at CommandPaletteView.module.exports.CommandPaletteView.confirmed (C:\Users\mneimne\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\command-palette\lib\command-palette-view.js:159:32)
at CommandPaletteView.module.exports.SelectListView.confirmSelection (C:\Users\mneimne\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\atom-space-pen-views\lib\select-list-view.js:338:21)
at space-pen-div.atom.commands.add.core:confirm (C:\Users\mneimne\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\atom-space-pen-views\lib\select-list-view.js:109:19)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\mneimne\AppData\Local\atom\app-1.0.19\resources\app.asar\src\command-registry.js:245:29)
at C:\Users\mneimne\AppData\Local\atom\app-1.0.19\resources\app.asar\src\command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\mneimne\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:524:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\mneimne\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:347:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (C:\Users\mneimne\AppData\Local\atom\app-1.0.19\resources\app.asar\src\window-event-handler.js:184:20)
Commands
-8:01.3.0 core:save (atom-text-editor.editor.is-focused)
-7:19.3.0 fuzzy-finder:toggle-file-finder (atom-text-editor.editor.is-focused)
-7:17.5.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-7:12.5.0 core:cut (atom-text-editor.editor.is-focused)
-7:12.2.0 core:save (atom-text-editor.editor.is-focused)
3x -4:55.3.0 core:backspace (atom-text-editor.editor.mini.is-focused)
-4:53.5.0 core:confirm (atom-text-editor.editor.mini.is-focused)
2x -4:49.9.0 editor:newline (atom-text-editor.editor.is-focused)
2x -4:45.8.0 find-and-replace:select-next (atom-text-editor.editor.is-focused)
-4:44.7.0 settings-view:open (atom-text-editor.editor.is-focused)
-0:14.6.0 fuzzy-finder:toggle-file-finder (atom-text-editor.editor.is-focused)
-0:12.6.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
-0:12.6.0 core:cancel (atom-text-editor.editor.mini.is-focused)
-0:10.5.0 command-palette:toggle (atom-text-editor.editor.is-focused)
-0:07.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:07.2.0 php-cs-fixer:toggle (atom-text-editor.editor)
Config
{
"core": {
"themes": [
"atom-dark-ui",
"monokai"
],
"disabledPackages": [
"minifier"
]
}
}
Installed Packages
# User
atom-autocomplete-php, v0.13.7
less-autocompile, v1.0.0
linter, v0.12.7
linter-phpcs, vundefined
monokai, v0.14.0
node_modules, vundefined
php-cs-fixer, v0.0.0
project-manager, v1.15.10
# Dev
No dev packages
winstliu commented
Please update php-cs-fixer
to the latest version (2.5.0) and then try again.