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

Error: Chunk.entry was removed. Use hasRuntime() #20

Closed
jameswyse opened this issue Jul 14, 2016 · 13 comments
Closed

Error: Chunk.entry was removed. Use hasRuntime() #20

jameswyse opened this issue Jul 14, 2016 · 13 comments

Comments

@jameswyse
Copy link

The latest webpack release (2.1.0-beta.17) raises the following error:

node_modules/webpack/lib/Chunk.js:34
        throw new Error("Chunk.entry was removed. Use hasRuntime()");
        ^

Error: Chunk.entry was removed. Use hasRuntime()
    at Chunk.Object.defineProperty.get (node_modules/webpack/lib/Chunk.js:34:9)
    at node_modules/webpack-split-by-path/index.js:91:23
    at Array.filter (native)
    at Compilation.<anonymous> (node_modules/webpack-split-by-path/index.js:89:10)
    at Compilation.applyPluginsBailResult (node_modules/webpack/node_modules/tapable/lib/Tapable.js:52:27)
    at Compilation.seal (node_modules/webpack/lib/Compilation.js:543:8)
    at Compiler.<anonymous> (node_modules/webpack/lib/Compiler.js:436:15)
    at node_modules/webpack/node_modules/tapable/lib/Tapable.js:152:11
    at Compilation.<anonymous> (node_modules/webpack/lib/Compilation.js:434:10)
    at node_modules/webpack/lib/Compilation.js:410:12
    at node_modules/webpack/lib/Compilation.js:325:10
    at node_modules/async/lib/async.js:52:16
    at done (node_modules/async/lib/async.js:246:17)
    at node_modules/async/lib/async.js:44:16
    at node_modules/webpack/lib/Compilation.js:325:10
    at node_modules/async/lib/async.js:52:16

Seems to be related to index.js:91

Also see this related issue on the webpack repo: webpack/webpack#2764

And this commit to the extract-text plugin for a similar problem may be of help: webpack-contrib/extract-text-webpack-plugin@ba0a71d

@klanjabrik
Copy link

klanjabrik commented Jul 19, 2016

@jameswyse try this:

npm install extract-text-webpack-plugin@^2.0.0-beta

And if you see new error (below) after installation:

throw new Error("Breaking change: extract now only takes a single argument. 
              ^
Error: Breaking change: extract now only takes a single argument. Either an options object *or* the loader(s).

Try to change your module loaders in webpack config:

loader: ExtractTextPlugin.extract({ notExtractLoader: 'style-loader', loader: 'css-loader!postcss-loader!sass-loader' })

@salzhrani
Copy link

The Chunk API changed. it seems that it needs a fix

@ndelangen
Copy link
Contributor

I'm getting the same Error @jameswyse is getting with the newest version of webpack

"webpack": "^2.1.0-beta.20",
"webpack-dev-server": "^2.1.0-beta.0",
"extract-text-webpack-plugin": "^2.0.0-beta.3",

@ndelangen
Copy link
Contributor

I think this is what's failing:

return chunk.entry && chunk.name && ignoreChunks.indexOf(chunk.name) === -1;

According to this thread:
webpack/webpack#2764

This fix in extract-text-webpack-plugin fixed something related to it:
webpack-contrib/extract-text-webpack-plugin@d40c131

@ndelangen
Copy link
Contributor

fixed by changing if(c.entry) to if(c.hasRuntime())

found here: Hashnode/mern-starter#200 (comment)

@ndelangen
Copy link
Contributor

I was able to find a solution to make it work @jameswyse, I've submitted a PR, If in need, you could see what I did to make it work.

@aldendaniels
Copy link

I'm running into this issue using webpack v1.13.2

@tarlepp
Copy link

tarlepp commented Sep 21, 2016

yep same here with webpack 1.13.2

@tarlepp
Copy link

tarlepp commented Sep 21, 2016

@aldendaniels you can get this working if you change your package.json to contain following:

"webpack-split-by-path": "0.0.10"

It seems like #22 broke compatibility with webpack 1.x branch. That PR should also contain updated package.json but it doesn't.

@BohdanTkachenko
Copy link
Owner

You're right, @tarlepp Last version is 0.1.0-beta.1 which is working only with webpack2
But that's a bit stange to me, because NPM should not update to major version automatically

@tarlepp
Copy link

tarlepp commented Sep 23, 2016

@BohdanTkachenko actually it's minor change http://semver.org/

@BohdanTkachenko
Copy link
Owner

@tarlepp you're right. I will fix this then

@BohdanTkachenko
Copy link
Owner

We just released 2.0.0 version of this plugin for webpack 2.
For webpack 1 there is still a branch webpack1 and version 1.0.0 on NPM.

Please consider upgrading to webpack 2 and version 2.0.0 of this plugin.
If this issue still reproduces on 2.0.0 please re-open this issue.
If you really need to have this in 1.0.0, PR's to webpack1 branch are always welcome, but I don't longer plan to fix issues for webpack1.

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

7 participants