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

Chunk.initial was removed. Use canBeInitial/isOnlyInitial() #121

Closed
mkg0 opened this issue Feb 20, 2018 · 10 comments
Closed

Chunk.initial was removed. Use canBeInitial/isOnlyInitial() #121

mkg0 opened this issue Feb 20, 2018 · 10 comments

Comments

@mkg0
Copy link

mkg0 commented Feb 20, 2018

I'm facing an error when I try to start webpack after the upgrade. My environment like below:

node version: v9.4.0
webpack-manifest-plugin:  v2.0.0-rc.1
webpack version: v4.0.0-beta.2

error trace

/{ProjectRoot}/node_modules/webpack/lib/Chunk.js:70
		throw new Error("Chunk.initial was removed. Use canBeInitial/isOnlyInitial()");
		^

Error: Chunk.initial was removed. Use canBeInitial/isOnlyInitial()
    at Chunk.get initial [as initial] (/{ProjectRoot}/node_modules/webpack/lib/Chunk.js:70:9)
    at ManifestPlugin.<anonymous> (/{ProjectRoot}/node_modules/webpack-manifest-plugin/lib/plugin.js:63:65)
    at Array.reduce (native)
    at ManifestPlugin.<anonymous> (/{ProjectRoot}/node_modules/webpack-manifest-plugin/lib/plugin.js:49:26)
    at Array.reduce (native)
    at ManifestPlugin.<anonymous> (/{ProjectRoot}/node_modules/webpack-manifest-plugin/lib/plugin.js:48:36)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/{ProjectRoot}/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:7:1)
    at AsyncSeriesHook.lazyCompileHook [as _callAsync] (/{ProjectRoot}/node_modules/tapable/lib/Hook.js:35:21)
    at Compiler.emitAssets (/{ProjectRoot}/node_modules/webpack/lib/Compiler.js:301:19)
    at onCompiled (/{ProjectRoot}/node_modules/webpack/lib/Watching.js:49:19)
    at hooks.afterCompile.callAsync.err (/{ProjectRoot}/node_modules/webpack/lib/Compiler.js:452:14)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/{ProjectRoot}/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:15:1)
    at AsyncSeriesHook.lazyCompileHook [as _callAsync] (/{ProjectRoot}/node_modules/tapable/lib/Hook.js:35:21)
    at compilation.seal.err (/{ProjectRoot}/node_modules/webpack/lib/Compiler.js:449:30)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/{ProjectRoot}/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook [as _callAsync] (/{ProjectRoot}/node_modules/tapable/lib/Hook.js:35:21)
error Command failed with exit code 1.
@mkg0
Copy link
Author

mkg0 commented Feb 20, 2018

for a temporary solution, I updated package with @andriijas's PR:
#118

package.json

"webpack-manifest-plugin": "andriijas/webpack-manifest-plugin"

@mastilver
Copy link
Contributor

closing this as it's should be availble on latest rc2

@dreyks
Copy link

dreyks commented Mar 13, 2018

FWIW yarn add webpack-manifest-plugin@next still gives me rc1. had to specify rc2 manually, now everything works

@mastilver
Copy link
Contributor

Thank you for raising that, I forgot to tag it correctly... :/

And I don't think I can update it now, so rc.2 is latest

@aaronshaf
Copy link

@mastilver Can you publish rc.2 to npm?

@mastilver
Copy link
Contributor

it is

'2.0.0-rc.2': '2018-02-28T23:03:15.733Z'

@aaronshaf
Copy link

With 2.0.0-rc.2 I am still getting:

webpack_1      | [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 519 bytes {main} [built]
webpack_1      |     + 713 hidden modules
webpack_1      | /usr/src/app/node_modules/webpack/lib/Chunk.js:72
webpack_1      | 		throw new Error(ERR_CHUNK_INITIAL);
webpack_1      | 		^
webpack_1      |
webpack_1      | Error: Chunk.initial was removed. Use canBeInitial/isOnlyInitial()
webpack_1      |     at Chunk.get initial [as initial] (/usr/src/app/node_modules/webpack/lib/Chunk.js:72:9)
webpack_1      |     at ManifestPlugin.<anonymous> (/usr/src/app/client/node_modules/webpack-manifest-plugin/lib/plugin.js:67:66)

@aaronshaf
Copy link

Nevermind, figured it out!

@jhyman2
Copy link

jhyman2 commented Apr 9, 2019

Upgrading from "webpack-manifest-plugin": "^1.3.2", to "webpack-manifest-plugin": "^2.0.4", fixed this for me.

@jacobmassengill
Copy link

Upgrading from "webpack-manifest-plugin": "^1.3.2", to "webpack-manifest-plugin": "^2.0.4", fixed this for me.

This fixed the issue for me. Thanks!

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

No branches or pull requests

6 participants