-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read property 'split' of undefined #406
Comments
The error is coming from trying to act upon the data that comes back from reading your file when no data is coming back. This is something that I can improve, but ultimately that's just handling the error state better. It isn't going to help with your real issue, which is the file not being found. I don't know why it is having issues finding the file sometimes and not others. My guess is that it is related to "Atomic saves". You could try stopping a project, changing the value of the slider in the settings, then starting it again. Without being able to reproduce this I don't know why it's happening. I will mark this as a bug though, just so we can better handle error states. |
Hi. I have the same issue only using Visual Studio, but when using Notepad++ or other editor, it compiles correctly. When i stop and run the project, it always compile correctly in any editor. Tried to set the "Atomic saves delay" to any value, it wont solve the issue. Didint look any further in the code, but just placing a setTimeout on App.js processInputFolder function (line 61) will solve my issue. Using:
|
Weird. Since I can't reproduce this I have no means to experiment with it, but I'm curious if this fix comes from the JS event loop and even setting a time out of Either way, binding the timeout duration to match the atomic slider would work, as it would always have a minimum delay of 0ms to cause the event loop to cycle, but could allow setting a 700 ms delay for those on slower machines. |
Same happens to me. Stopping and starting the watcher is the only way to process the sass. Visual Studio Code: v1.38.1 (b37e54c98e1a74ba89e03073e5a3761284e3ffb0) |
This is happening for me now too. When I start a project, it compiles fine, but then when I make changes after that it gives me an error in Dev Tools: "Uncaught TypeError: Cannot read property 'split' of undefined". If I stop it, then start again, it processes changes, but then gives the error again unless stopped. Happening across all my projects. I'm using Atom 1.42.0 on Windows 10. |
Was finally able to reproduce the issue consistently. I've added in some better safety checking and a helpful warning message to clue people into bumping up their atomic save delay setting if they are encountering this (to hopefully reduce the amount of GitHub issues created around it). This has been merged to master and will be in the next release of Scout-App. |
Will there be a on-off toggle all together? @TheJaredWilcurt |
No, there is a slider that takes the delay from 0 to 700ms. So "0ms" delay would be "off". |
First of all Thanks a lot for this App I do love it ;). Same Error same error Log . It works after I modified scout-files/_scripts/app.js and added a timout for that processInputFolder like @tiagoagre suggested. |
The fix is in |
Hi @TheJaredWilcurt Thank you very much for your reply. Everything working out after adding a timout for that processInputFolder, but sometimes you need to save the file 2 times to compile( which is not a big problem - maybe I need to play with that timout val!!). |
Hello,
I was working on 2.12.12 and everything works, now I moved to 2.18.16 and afer few saves it stops working. When I undo changes it is ok, but every next change there is same error.
The text was updated successfully, but these errors were encountered: