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
Webpack - No Output File, No Errors Reported #1736
Comments
Please note that webpack-dev-server runs in memory by design. If you want a real bundle, build through webpack. |
I ran the webpack command as well. It doesnt seem to store the file in the directory. Also, the output properties should be respected and the bundle output should have been stored in the directory, no? |
I have a minimum build setup at my tutorial. Perhaps going through that would clear things up? You can also check out the official getting started. There might be something missing. It's hard to tell without having something to run. |
Thanks bebraw, appreciate the effort. I did infact go through your awesome SurviveJs first few chapters to get the handle on Webpack. YuWu from SO also ran the Github build I posted the link to and he had the output in the folder. Im thinking this is Ubuntu permission issue and thoroughly went through the read / write permission review and everything seems to be fine. What is baffling is that Webpack reports in CLI that the output 'bundle' has been emitted, yet where, I dont know. I'll go through again the setup again and see how it goes. All the previous build gave me the 'Cannot resolve 'file' or 'directory' error. |
After combing through it line by line, the culprit seems to be this: devtool : 'source-map', // same for 'devtool : 'eval-source-map'
So, yes, the dev-server stores the emitted files in memory, however, why is the command not giving any error and making the files not appear in the folder? devtool : 'source-map' Do I need to install anything additional for devtool? |
That sounds weird. If Feels like a bug to me.
I think it should just work out of box. You can try to dig into the dependency it uses to generate the sourcemaps. Digging into the source might be a good idea. |
Im not sure whether I should be embarrassed about this or not :!
So sorry about this & thank you for the attention towards this @bebraw :! |
No worries. Great to hear you got it working. That behavior sounds a little strange to me (Ubuntu related quirk?). I set up a separate issue for that at #1746. |
Thanks bebraw spent too long not knowing about the memory thing... |
Thank you bebraw, that tip about the webpack-dev-server running in memory saved me from giving up and switching back to Gulp for my project. |
Greetings, I am unclear as to why webpack is not creating the app/js/main.js file that is in my webpack.config.js file. I have ran npm webpack install -g before and after creating the the webpack.config.js file and that main.js file still does not get created. |
@ldco2016 Can you open a question at Stack Overflow with your configuration? That will most likely yield a good answer. Thanks. |
Be sure, that your code is clean, and you have not |
@Kay2dan I noticed that you don't have an I'm getting weird inconsistencies with webpack like you've described - i.e. no errors but no output and I'm not using NB there are some path relative issues:
You can find the code in my style-loader bug report:
As an aside there's a path inconsistency between
|
Encountered this behaviour again with one of the RiotJS examples: changing
|
@bebraw I have read your survivejs/webpack book. That's excellent. |
I have the same problem. I need these files, when I develop some browser extensions |
@monolithed Can you open a separate issue? Make sure to fill the fields well. |
I had the same problem but i could solve it by require this |
You can use this plugin to force the webpack dev server to write files to the disk! |
In my case I had
|
you need to run |
If you delete /dist/ folder manually, please try run |
Same issue, figured out that problem related to uglifyjs-webpack-plugin@2.0.1, |
What I did was to run the production mode:
and then it generates the output files |
You can supply the |
@smac89 our hero! |
Emm,I encountered a similar problem because the file name in the router is different from the case of the file name in src |
Sometimes, webpack fails when configuration has mistakes when using
GOOD: webpack produces the expected bundle file
If the target output path is a valid folder, then webpack generates a bundle file, otherwise, will not, reporting zero errors. So @Kay2dan, have you check how you use |
It seems like the docs does not mentioned / put emphasis on the in memory idea pointed out by @bebraw.(many thanks btw) No search result on the page https://webpack.js.org/configuration/dev-server/#devserverwritetodisk- but I think it's better to be put on the first line in my point of view. Here is my post on StackOverflow when I was trying to solve this problem with pictural answer for anyone who need a conclusion to this problem. (Indeed @temple 's reply directly above this solved my problem but I hadn't read it when I finished the SO post.) |
I am learning Webpack and going through it again and again. In the latest build, there is something very strange going on. CLI reports everything is well & the output file dress_aphrodite.js is emitted, yet its nowhere to be found in the folder.
Here are the logs:
From CLI:
So everything looks good above. Yet, there is no
dress_aphrodite.js
file in the main folder or./app
folder.Here is the webpack.config.js file:
And finally, incase, anyone needs the package.json file, here it is:
Any help as to why the output file is not being emitted / rendered?
Thanks
Edit: Tried without the
Output.publicPath
(as suggested by YuWu), still no change. Changed it topath
property & still no change as well.Edit 2: As a test, I added the
html-webpack-plugin
into thewebpack.config.js
file to see if it would be emitted by webpack and yes, apparently that too has been emitted and yet I cannot see.Edit 3: (Post generous conversation with YuWu) : The
webpack-dev-server
is running fine and displaying the window.alert in the js file along with the dynamic html file created viahtml-webpack-plugin
. I recall installing thewebpack-dev-server
globally. Could that be where the html & the js emitted files are being stored?question posted on SO here
The text was updated successfully, but these errors were encountered: