facebookarchive / prepack

A JavaScript bundle optimizer.
http://prepack.io
Other
14.22k stars 425 forks source link

Invariant Violation exception while processing files using webpack-prepack-plugin #2540

Closed Simek closed 6 years ago

Simek commented 6 years ago

I am receiving Invariant Violation exception while processing my app files using latest prepack and webpack-prepack-plugin with empty configuration file like in example: https://github.com/gajus/prepack-webpack-plugin#example.

I am not sure if it's a bug on the preact side but I decided to report it due to comment in exception.

Prepack: 0.2.51 Prepack Webpack Plugin: 1.1.1 Webpack: 4.17.2 Node: 10.9.0 OS: Mac

Exception trace:

➤ 「command」: { Invariant Violation: 
This is likely a bug in Prepack, not your code. Feel free to open an issue on GitHub.
    at invariant (XXX/node_modules/prepack/lib/invariant.js:24:15)
    at new Serializer (XXX/node_modules/prepack/lib/serializer/serializer.js:78:28)
    at prepackSources (XXX/node_modules/prepack/lib/prepack-standalone.js:79:22)
    at chunk.files.forEach.filePath (XXX/node_modules/prepack-webpack-plugin/dist/PrepackPlugin.js:43:104)
    at Array.forEach (<anonymous>)
    at chunks.forEach.chunk (XXX/node_modules/prepack-webpack-plugin/dist/PrepackPlugin.js:37:23)
    at Array.forEach (<anonymous>)
    at compilation.hooks.optimizeChunkAssets.tap.chunks (XXX/node_modules/prepack-webpack-plugin/dist/PrepackPlugin.js:35:16)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (XXX/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:9:1)
    at AsyncSeriesHook.lazyCompileHook [as _callAsync] (XXX/node_modules/tapable/lib/Hook.js:35:21)
    at hooks.additionalAssets.callAsync.err (XXX/node_modules/webpack/lib/Compilation.js:1280:36)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (XXX/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook [as _callAsync] (XXX/node_modules/tapable/lib/Hook.js:35:21)
    at hooks.optimizeTree.callAsync.err (XXX/node_modules/webpack/lib/Compilation.js:1276:32)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (XXX/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook [as _callAsync] (XXX/node_modules/tapable/lib/Hook.js:35:21) name: 'Invariant Violation' }
error Command failed with exit code 1.