webpack / analyse

analyse web app for webpack stats
http://webpack.github.com/analyse
882 stars 138 forks source link

Error running production build. Fresh install. #20

Closed mrbinky3000 closed 7 years ago

mrbinky3000 commented 8 years ago

Fresh install. Ran default "grunt" task for the first time. Got the following.

Running "copy:main" (copy) task
Copied 1 files

Running "webpack:production" (webpack) task
Version: webpack 1.12.12
                     Asset     Size  Chunks             Chunk Names
 6.c409385e8da907ce65d1.js  12.1 kB       6  [emitted]
                    web.js   102 kB       0  [emitted]  main
 2.c409385e8da907ce65d1.js  3.94 kB       2  [emitted]
 3.c409385e8da907ce65d1.js   5.6 kB       3  [emitted]
 4.c409385e8da907ce65d1.js  4.91 kB       4  [emitted]
 5.c409385e8da907ce65d1.js  11.5 kB       5  [emitted]
 1.c409385e8da907ce65d1.js  9.06 kB       1  [emitted]
 7.c409385e8da907ce65d1.js  1.35 kB       7  [emitted]
 8.c409385e8da907ce65d1.js  1.97 kB       8  [emitted]
 9.c409385e8da907ce65d1.js  2.61 kB       9  [emitted]
10.c409385e8da907ce65d1.js  1.33 kB      10  [emitted]
11.c409385e8da907ce65d1.js   869 kB      11  [emitted]

WARNING in web.js from UglifyJs
Dropping side-effect-free statement [./app/entry.js:54,0]
Dropping side-effect-free statement [./app/entry.js:55,0]
Dropping side-effect-free statement [./app/entry.js:56,0]
Dropping side-effect-free statement [./app/entry.js:57,0]
Side effects in initialization of unused variable findById [./app/graphs/modules.js:3,0]
Side effects in initialization of unused variable chunkCount [./app/graphs/modules.js:12,0]
Condition always true [./app/googleAnalytics.js:1,0]
Dropping unreachable code [./app/googleAnalytics.js:30,0]

WARNING in 1.c409385e8da907ce65d1.js from UglifyJs
Dropping unused variable interp [./~/jade-loader!./app/pages/module/module.jade:8,0]

WARNING in 2.c409385e8da907ce65d1.js from UglifyJs
Dropping unused variable interp [./~/jade-loader!./app/pages/assets/assets.jade:8,0]

WARNING in 3.c409385e8da907ce65d1.js from UglifyJs
Side effects in initialization of unused variable findById [./app/graphs/chunks.js:3,0]
Dropping unused variable interp [./~/jade-loader!./app/pages/chunks/chunks.jade:8,0]

WARNING in 4.c409385e8da907ce65d1.js from UglifyJs
Dropping unused variable interp [./~/jade-loader!./app/pages/modules/modules.jade:8,0]

WARNING in 5.c409385e8da907ce65d1.js from UglifyJs
Dropping unused variable interp [./~/jade-loader!./app/pages/hints/hints.jade:8,0]

WARNING in 6.c409385e8da907ce65d1.js from UglifyJs
Dropping unused variable interp [./~/jade-loader!./app/pages/chunk/chunk.jade:8,0]

WARNING in 7.c409385e8da907ce65d1.js from UglifyJs
Dropping unused variable interp [./~/jade-loader!./app/pages/warnings/warnings.jade:8,0]

WARNING in 8.c409385e8da907ce65d1.js from UglifyJs
Dropping unused variable interp [./~/jade-loader!./app/pages/upload/application.jade:8,0]

WARNING in 9.c409385e8da907ce65d1.js from UglifyJs
Dropping unused variable interp [./~/jade-loader!./app/pages/home/home.jade:8,0]

WARNING in 10.c409385e8da907ce65d1.js from UglifyJs
Dropping unused variable interp [./~/jade-loader!./app/pages/errors/errors.jade:8,0]

ERROR in ./~/jade/lib/runtime.js
Module not found: Error: Cannot resolve module 'fs' in /Users/matt/Sites/webpack-analyse/node_modules/jade/lib
 @ ./~/jade/lib/runtime.js 155:12-25
Warning: Task "webpack:production" failed. Use --force to continue.

Aborted due to warnings.

Here's some info on my environment

OSX El Capitan v10.11.13
npm: v3.5.3
node: v5.0.0
grunt-cli: v0.1.13
grunt: v0.4.5
mbtts commented 8 years ago

I found adding this to the configuration resolved this error:

This has been suggested as workaround before.

config.node = { fs: "empty" };

a-r-d commented 8 years ago

@mrbinky3000 I think this merge fixed your issue - https://github.com/webpack/analyse/pull/23

Let me know

a-r-d commented 7 years ago

This appears to be fixed by issue #23

closing.