question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught TypeError: Cannot read property 'onDidChangeIcon' of undefined

See original GitHub issue

[Enter steps to reproduce:]

  1. Right click file tree
  2. “Add Project Folder”
  3. Folder adds into the tree, but Type Error pops up, and no icons visible.

Atom: 1.15.0 ia32 Electron: 1.3.13 OS: Microsoft Windows 10 Pro Thrown From: file-icons package 2.1.1

Stack Trace

Uncaught TypeError: Cannot read property ‘onDidChangeIcon’ of undefined

At C:\Users\TheBrenny\.atom\packages\file-icons\lib\service\icon-node.js:30

TypeError: Cannot read property 'onDidChangeIcon' of undefined
    at /packages/file-icons/lib/service/icon-node.js:30:12)
    at /packages/file-icons/lib/consumers/tree-entry.js:41:19)
    at TreeView.track (/packages/file-icons/lib/consumers/tree-view.js:82:25)
    at TreeView.rebuild (/packages/file-icons/lib/consumers/tree-view.js:73:9)
    at disposables.add.atom.project.onDidChangePaths (/packages/file-icons/lib/consumers/tree-view.js:48:45)
    at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
    at Project.module.exports.Project.addPath (/app.asar/src/project.js:288:29)
    at /app.asar/src/atom-environment.js:1011:40
    at /app.asar/src/application-delegate.js:31:16)
    at emitTwo (events.js:106:13)
    at EventEmitter.emit (events.js:191:7)

Commands

     -6:57.9.0 intentions:highlight (input.hidden-input)
     -6:57.7.0 core:save (input.hidden-input)
 13x -6:47.4.0 core:move-up (input.hidden-input)
 24x -6:44.4.0 core:move-down (input.hidden-input)
 19x -6:43.2.0 core:move-up (input.hidden-input)
     -6:40.5.0 intentions:highlight (input.hidden-input)
  4x -6:40.4.0 core:undo (input.hidden-input)
  2x -6:37.4.0 core:redo (input.hidden-input)
     -6:36.8.0 core:undo (input.hidden-input)
     -6:36.2.0 intentions:highlight (input.hidden-input)
     -6:36.1.0 core:save (input.hidden-input)
  5x -6:32.8.0 core:move-left (input.hidden-input)
  3x -6:31.9.0 core:move-up (input.hidden-input)
     -6:15 tree-view:remove-project-folder (div.header.list-item.project-root-header)
     -0:46.9.0 application:add-project-folder (div.header.list-item.project-root-header)
     -0:23.2.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always.compact-tab-bar.panel-shadows.use-animations.compact-tree-view.blend-tree-view.theme-genesis-syntax.theme-atom-material-ui.has-custom-icons)

Non-Core Packages

atom-beautify 0.29.17 
atom-commander 0.8.8 
atom-material-syntax 1.0.2 
atom-material-ui 1.3.9 
busy-signal 1.3.0 
emmet 2.4.3 
file-icons 2.1.1 
firepad 0.8.0 
genesis-syntax 1.0.9 
genesis-ui 0.5.0 
git-plus 7.3.3 
intentions 1.1.2 
linter 2.1.0 
linter-jsonlint 1.3.0 
linter-pylint 1.2.3 
linter-ui-default 1.2.1 
minimap 4.26.8 
package-sync 1.1.0 
pigments 0.39.1 
platformio-ide-terminal 2.5.0 
script 3.14.1 
SFTP-deployment 1.0.2 

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

7reactions
Alhadiscommented, Mar 30, 2017

@dyaa https://github.com/file-icons/atom#troubleshooting

  1. Open the command palette: <kbd>Cmd/Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>
  2. Enter file-icons:clear-cache
  3. Reload the window, or restart Atom
1reaction
llamicroncommented, May 4, 2017

I’d like to add that I was using the unfancy-file-icons package, as well as this one, and for me the error happened when I tried to use advanced-open-file. Disabling unfancy-file-icons, clearing the cache, and restarting Atom fixed it. It seems that unfancy-file-icons conflicts with this package, but this one is better anyway.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'onDidChangeIcon' of null · Issue #698 ...
In the instance that I'm experiencing right now there is only one file ( .yaml ) in the problematic directory, no sub folders....
Read more >
Uncaught TypeError: Cannot read property of undefined
The problem is clearly that state.greens[a] is undefined for a specific index a. Add a check before to get rid of the immidiate...
Read more >
Cannot read properties of undefined' - JavaScript Debugging
JavaScript Tutorial. How To Fix ' Uncaught TypeError : Cannot read properties of undefined ' - JavaScript Debugging. 26K views 6 months ago....
Read more >
How to Fix Uncaught TypeError: Cannot read properties of ...
Uncaught TypeError : Cannot read propertyIf you're a JavaScript developer, you've probably seen this error more than you care to admit.
Read more >
TypeError: Cannot read property 'data' of undefined
catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found