Closed edarblanco closed 7 years ago
Hey @edarblanco some steps to reproduce would be cool.
Oh, my apologies, but apparently I solved the problem precisely today, I deleted the configuration folder of the plugin and to reinstall it everything was perfect, I give the thread as closed, thanks
I have just had the same issue with Atom v1.14.4 on macOS. To reproduce:
touch foo.js
atom foo.js
foo.js
but do not save the filerm foo.js
foo.js
in AtomThis mostly happens to me when I switch between branches. I'll leave files open (in background tabs) that do not exist on another branch, and if I switch back to one of those tabs (manually or just when closing other tabs and they are supposed to come to the foreground) I run into this issue.
Yep I just got the same issue too
[Enter steps to reproduce:]
atom .
. I did have other instances of atom already open for different directories. Worth nothing that this was not a standard
linted project (just regular eslint) so I would not have expected anything from standard.Atom: 1.15.0 x64 Electron: 1.3.13 OS: Mac OS X 10.11.6 Thrown From: linter-js-standard package 3.9.0
Uncaught TypeError: Cannot read property 'style' of undefined
At /Users/rankida/.atom/packages/linter-js-standard/lib/init.js:111
TypeError: Cannot read property 'style' of undefined
at Object.__cacheTextEditor (/packages/linter-js-standard/lib/init.js:111:18)
at storeSettings (/packages/linter-js-standard/lib/init.js:79:14)
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 /app.asar/src/pane-container.js:348:27
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 Pane.module.exports.Pane.setActiveItem (/app.asar/src/pane.js:300:22)
at Pane.module.exports.Pane.activateItem (/app.asar/src/pane.js:452:21)
at TabBarView.module.exports.TabBarView.onMouseDown (/app.asar/node_modules/tabs/lib/tab-bar-view.js:678:19)
atom-beautify 0.29.17
atom-typescript 11.0.1
busy-signal 1.3.0
intentions 1.1.2
linter 2.1.0
linter-eslint 8.1.4
linter-js-standard 3.9.0
linter-ui-default 1.2.1
platformio-ide-terminal 2.5.0
react 0.16.2
I repro'd this when I renamed a dir and touched files in atom with pathnames that did not exist (after the move).
When the file does not exist checkStyleSettings
ignores the error, and returns undefined
:
https://github.com/ricardofbarros/linter-js-standard/blob/60643d80615f9f1133dc71370575ad2f25e29932/lib/utils/style-settings.js#L41
Which causes opts
to be undefined here:
https://github.com/ricardofbarros/linter-js-standard/blob/60643d80615f9f1133dc71370575ad2f25e29932/lib/init.js#L108
Which causes Cannot read property 'style' of undefined
here:
https://github.com/ricardofbarros/linter-js-standard/blob/60643d80615f9f1133dc71370575ad2f25e29932/lib/init.js#L111
I get this error whenever I checkout a new branch with git. Atom suddenly randomly marks some tabs as unsaved and throws gazillions of these errors.
I can't say it happens 100% of the time, but definitely most of the time. I'd be happy to do debugging on my end if needed.
@ricardofbarros will you please re-open this issue. It is definitely an active bug and there is now explicit steps to reproduce it.
Now this is my solution, save the atom package list, and remove or save in another location the atom packages configuration, and install with apm install the list of all the packages, for my work, but my problem was one package outdated
My steps to reproduce:
@alancnet Yes, I've frequently gotten that error doing similar actions.
But strangely I just tried it and couldn't manage to cause the error. Atom picked up the change immediately.
Maybe we're dealing with a sketchy file watcher here?
I can reproduce the error by deleting a file that Atom currently has open in an inactive tab, then switching to the tab.
To eliminate as much unpredictability as possible, here is a command line that will generate the error 100% of the time.
touch foo.js && touch bar.js && atom foo.js && sleep 10 && rm foo.js && atom bar.js
Now just click back on the tab for foo.js and you'll see the error. At least I do, on Mac OS 10.12.4.
Create a new file and switch from, then switch to, the new file. Since atom hasn't created the file in the filesystem yet (because it hasn't yet been saved), this error will be thrown
Got the issue too....
I ended up switching to prettier
come on, when will this be fixed??
if i submit a pr would you accept it?
I'll install from your fork if it doesn't get merged or fixed in some other way.
This bug is very reproducible when trying to edit JSX files with a .js extension. It makes atom unusable in fact since it pops up every time you try to switch tabs. Uninstalled linter-js-standard and installed prettier
likewise, switched to prettier
I have this problem too. Almost 5 months, a lot of angry users and no reaction from the maintainer? Bad impression... 👎
This will be fixed in an upcoming patch version.
Released in v3.9.2 🎉
[Enter steps to reproduce:]
Atom: 1.14.4 x64 Electron: 1.4.15 OS: "Arch Linux" Thrown From: linter-js-standard package 3.9.0
Stack Trace
Uncaught TypeError: Cannot read property 'style' of undefined
Commands
Non-Core Packages