webpack / analyse

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

npm run build failed MainTemplate.getAssetPath is deprecated #42

Closed aovchinn closed 4 years ago

aovchinn commented 4 years ago
$ npm run build

> webpack-analyse@0.0.0 build C:\Users\petovchial\sources\analyse
> rimraf dist && webpack --mode production --env.longTermCaching --env.googleAnalytics

(node:2400) [DEP_WEBPACK_MAIN_TEMPLATE_GET_ASSET_PATH] DeprecationWarning: MainTemplate.getAssetPath is deprecated (use Compilation.getAssetPath instead)
(node:2400) UnhandledPromiseRejectionWarning: ReferenceError: BigInt is not defined
    at compilation.hooks.optimizeChunks.tap.chunks (C:\Users\petovchial\sources\analyse\node_modules\webpack\lib\optimize\SplitChunksPlugin.js:564:19)
    at Hook.eval [as call] (eval at create (C:\Users\petovchial\sources\analyse\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:25:16)
    at Hook.CALL_DELEGATE [as _call] (C:\Users\petovchial\sources\analyse\node_modules\webpack\node_modules\tapable\lib\Hook.js:14:14)
    at Compilation.seal (C:\Users\petovchial\sources\analyse\node_modules\webpack\lib\Compilation.js:1643:36)
    at compilation.finish.err (C:\Users\petovchial\sources\analyse\node_modules\webpack\lib\Compiler.js:921:19)
    at hooks.finishModules.callAsync.err (C:\Users\petovchial\sources\analyse\node_modules\webpack\lib\Compilation.js:1546:4)
    at _next1 (eval at create (C:\Users\petovchial\sources\analyse\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:25:1)
    at _err1 (eval at create (C:\Users\petovchial\sources\analyse\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:43:1)
    at asyncLib.each.err (C:\Users\petovchial\sources\analyse\node_modules\webpack\lib\FlagDependencyExportsPlugin.js:249:11)
    at C:\Users\petovchial\sources\analyse\node_modules\neo-async\async.js:2830:7
    at Object.each (C:\Users\petovchial\sources\analyse\node_modules\neo-async\async.js:2850:39)
    at asyncLib.each.err (C:\Users\petovchial\sources\analyse\node_modules\webpack\lib\FlagDependencyExportsPlugin.js:228:18)
    at C:\Users\petovchial\sources\analyse\node_modules\neo-async\async.js:2830:7
    at done (C:\Users\petovchial\sources\analyse\node_modules\neo-async\async.js:2865:11)
    at C:\Users\petovchial\sources\analyse\node_modules\neo-async\async.js:2818:7
    at compilation.cache.get (C:\Users\petovchial\sources\analyse\node_modules\webpack\lib\FlagDependencyExportsPlugin.js:72:11)
    at needCalls (C:\Users\petovchial\sources\analyse\node_modules\webpack\lib\Cache.js:85:6)
    at err (C:\Users\petovchial\sources\analyse\node_modules\webpack\lib\Cache.js:39:11)
    at gotHandlers.push (C:\Users\petovchial\sources\analyse\node_modules\webpack\lib\cache\IdleFileCachePlugin.js:63:8)
    at hooks.get.callAsync (C:\Users\petovchial\sources\analyse\node_modules\webpack\lib\Cache.js:88:6)
    at _promise1.then._result1 (eval at create (C:\Users\petovchial\sources\analyse\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:30:1)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
(node:2400) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2400) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
davidcalhoun commented 4 years ago

Just a heads up, looks like the actual error is UnhandledPromiseRejectionWarning: ReferenceError: BigInt is not defined.

I think you have an older version of Node installed. Type node -v on the command line and make sure you have the minimum required version for the version of Webpack you're using.

aovchinn commented 4 years ago

thanks, that helped successfully builded with webpack@5.0.0-beta.24