Skip to content
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 4 issue #116

Closed
hangjit-domain opened this issue Jul 16, 2019 · 7 comments
Closed

Webpack 4 issue #116

hangjit-domain opened this issue Jul 16, 2019 · 7 comments

Comments

@hangjit-domain
Copy link

I have the following setup.

const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin;
const merge = require('webpack-merge');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const WorkboxPlugin = require('workbox-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const { DuplicatesPlugin } = require('inspectpack/plugin');

I'm running npx webpack which gives me the following output and doesn't progress further.
image

I've tried the command across cmd, bash and powershell (in Admin mode) but it doesn't seem to make any difference.

It works on Mac.

Also, when I get rid of below, it works just fine.

      new DuplicatesPlugin({
        // Emit compilation warning or error? (Default: `false`)
        emitErrors: false,
        // Handle all messages with handler function (`(report: string)`)
        // Overrides `emitErrors` output.
        emitHandler: undefined,
        // Display full duplicates information? (Default: `false`)
        verbose: false,
      })

I'm not even getting any log output on the console so it's stumping me.

Webpack version - 4.32.2
NPM version - 6.4.1
OS - Windows 10

@ryan-roemer
Copy link
Member

Can you create a minimal repository that exhibits the issue with install + build + error reproduction steps? I can then dig into that with a windows VM...

@hangjit-domain
Copy link
Author

I can't seem to replicate it on a separate repo. Is there a way I can turn on extra logging to see what's going on?

@ryan-roemer
Copy link
Member

You can remove emitHandler: undefined, to get more output. How long have you waited for the process to complete?

And, worst case, you can start inserting console.log in npm-installed node_modules/inspectpack and see if things are progressing...

I am curious as to why Mac works and Windows doesn't. The only thing offhand I've noticed is windows fs access through Node is often much slower than unix/mac...

@hangjit-domain
Copy link
Author

I've left it running overnight but still no good.

We've resorted to disabling it on windows.

@ryan-roemer
Copy link
Member

Can you share your webpack config?

And have you had any luck with a minimal reproduction that I could dig into?

Off hand I’m wondering if there’s something about a really large number of dependencies on windows in node_modules...

@ryan-roemer
Copy link
Member

Alternately, if you can't get a minimal reproduction, can you get me a sanitized stats object JSON dump? (Removing all of your actual sources which presumably are private)

This would be enormously useful to either identify an issue or isolate it to something in reading from node_modules in the versions action (which is the only thing not simulatable from a stats object).

You can create a full stats object with something like:

const { StatsWriterPlugin } = require("webpack-stats-plugin");

module.exports = {
  // ...
  plugins: [
    new StatsWriterPlugin({
      fields: ["assets", "modules"]
    })
  ]
};

in your webpack config, and go through and manually replace all of the "source": field values containing actual source with say: console.log('REMOVED'); or something... That would similarly give us enough to debug further.

For a helpful reference, we were able to diagnose an issue with a community members sanitized stats object here: #110

Thanks!

@hangjit-domain
Copy link
Author

Looks like someone on the team ended up removing it as we were conditionally enabling it for Mac users only.

I suppose you can close this topic now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants