-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
App will not run when there are warnings (originally app won't run in dev mode) #83
Comments
Hi. It's somewhat annoying..but the workaround is: Clean up your warnings, either by fixing code or by easing up the linter settings to not display warnings for your issues (if it's too many to fix). After a while, out team got used to this and we ended up with a "cleaner codebase" as in: do not push with warnings. |
@loopmode Thanks for the advice - will try fixing warnings, but some (if I remember correctly) are related to bootstrap and other libraries I was using. |
Will close this issue once I get it running |
Yeah maybe you just try to disable the warnings in eslint. I once asked in the slack channel but didn't get a response back then. Should have created an issue here instead :)
So.. @develar what are our options for an easy fix? |
@Gum-Joe I don't think you should close it. |
@loopmode Probably a better idea - will change the title to "Allow app to run even if warnings are shown" once this is resolved. If I have the time, should I try opening a PR? (Edit: if it's an issue related to how eslint and WDS work then we should probably just file issues on the places they should go) Of course, we could try:
Really we need to find what eslint is causing to happen to WDS that causes the code to not run. I think I have managed to get code off WDS when there are warnings - so this might not be the issue, |
@Gum-Joe A PR would be great. Of course we need to pinpoint the problem first. Doing some research on potential culprits now. Update: https://github.com/MoOx/eslint-loader#noerrorsplugin and https://github.com/MoOx/eslint-loader#failonwarning-default-false might be related |
@loopmode This might sound like a stupid question, but how do I join the slack workspace (I thought you needed an invite link)? Have not really done this type of thing before. |
@Gum-Joe Try https://slack.com/get-started - you should be able to find and join without an invite |
Thanks @loopmode managed to find if via Google search, but thanks! |
Ok so after some digging around it appears all the warnings are |
Exactly the same one I had with the There are some nitty-gritty details here: webpack/webpack-dev-server#212 The problem, as I see it:
Maybe we can configure a webpack context via |
Uh, very promosing! webpack/webpack#196 (comment) -> https://github.com/sindresorhus/require-fool-webpack :) |
Yes! Will use that as a workaround for now! Thank you! Gonna take a while to refactor the code.... The context plugin might not work for me, as the dynamic require paths are set at runtime. For example, I have plugins in my program, so it will be hard to determine a path to exclude. After my code works, will also have a look at webpack to try and add some sort of ignore line (by my understanding this is one solution). Would this work? |
App now loading, now just to fix its bugs:
|
Code now runs, will change issue title |
🎨 Got electron-webpack to run app, see electron-userland/electron-webpack#83 🐛 Now need to get packages working, going to compile on a per package bases. 🎨 Using source-map as devtool 🎨 Using sindresorhus/require-fool-webpack to solve webpack/webpack-dev-server#212
Would someone mind giving a sort of status/roll up of this? Seems like the issue's conversation went from eslint warnings breaking app startup in dev mode to write better code to working around specific warning checks related to dynamic dependencies and I'm a bit lost as to whether there's a general purpose workaround yet or not? We'd just like to be able to keep eslint warnings for minor and temporary things, e.g., TODO comments, and be able to use electron-webpack's dev mode without disabling and reenabling linting so frequently. |
@ylg I personally have not really had the time, although if I do have the time, I will consider taking a look at the eslint side of things. There is no workaround for eslint yet, besides from changing your config or correcting the warnings. For dynamic requires, use https://github.com/sindresorhus/require-fool-webpack. Correction: @loopmode has discovered that "https://github.com/MoOx/eslint-loader#noerrorsplugin and https://github.com/MoOx/eslint-loader#failonwarning-default-false might be related", so it should be as simple as changing the default config (hopefully). |
After electron-compile stopped working (electron-userland/electron-compile#287), we decided to move to using electron-webpack. After some issues (electron-userland/electron-webpack#83), we managed to get the app running. Major changes: - address-bar is now part of explorer - Core logic is now in `tara-core` - Explorer is now less buggy - Now using electron-webpack instead of electron-compile. Related Issues & PRs: #12 #13 #14 #15 Special thanks to @loopmode for advice & help!
monaco editor package is giving a warning of a not found package... that is ok, because is only for windows. tried adding to eslint-loader {failOnWarning: false, failOnError: false} but anyway it stops and never shows the electron window... how can I solve this? what option I'm missing? TIA |
Here we have people reporting two different use cases that I think should be considered individually:
The problem with webpack warning is that they are transitive. Unlike eslint warnings they extend outside the scope of your project and can raise in your dependencies. Even worse they can raise in the dependency of a dependency of a dependency... or your project. That means there may be a potential problem which is practically blocking your work, but only in a random library that you may not even know about, and you'll probably never be able to solve it even by making a pull request in the concerned project because there is 99% chances the maintainers don't use electron-webpack and don't care about supporting it. In my case I use a very specific library that I can't substitute using another one due to its uniqueness, it's humongous so I can't rewrite it, and it's badly packaged for webpack (but still working correctly). I can't use requireFool because I need to have it compiled using Babel and requireFool bypasses that. And for some strange reason the warnings only raise on Windows, not Linux. I don't even usually develop nor distribute from a Windows machine, this problem is just blocking me when I need to test a specific behavior on a that OS and when I would rather launch the application in development mode than compiling for production. So... wouldn't it be a good idea to introduce a configuration parameter to electron-webpack like |
I opened a new issue to have this fix released: #346 |
An extremely dirty workaround, but it works:
|
Fixed by release 2.8.0. |
After some investigation involving the original issue, we found that warnings are preventing the application from running. If you solve the warnings, it should work.
Original Issue:
Hello,
When I run
./node_modules/.bin/electron-webpack dev
my application does not open. It compiles successfully (albeit with warnings), yet doesn't open the application.After looking through the debug log there appears to be no trace of launching the application; furthermore, when using the quick start template, the app also failed to launch in dev mode (but launched when a production build was built).
I have tried creating a production build for my project, only to be greeted by:
Please note that this is my second attempt at webpack in electron after electron-compile stopped working (see electron-userland/electron-compile#287).
Any help will be appreciated & thanks in advanced!
The text was updated successfully, but these errors were encountered: