Laravel-mix: NPM Run Dev error Chunk.endpoint

Created on 23 Nov 2018  ·  4Comments  ·  Source: JeffreyWay/laravel-mix

Hi

I have been getting the issue below for a while. I have followed the steps in installation and reinstalled.

I have ran these:

rm -rf node_modules
npm cache clear
npm install

  • Node Version : 11.2.0
  • NPM Version: 6.4.1
  • OS: Mac OS 10.13.6

├── @babel/[email protected]
├── [email protected]
├── @babel/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├──[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]

 "private": true,
  "scripts": {
    "dev": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch-poll": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --watch-poll --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "hot": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "production": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  },

Description:

78% module and chunk tree optimization unnamed compat plugin/Users/me/repos/duty/node_modules/webpack/lib/Chunk.js:846
                throw new Error(
                ^

Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead
    at Chunk.get (/Users/me/repos/duty/node_modules/webpack/lib/Chunk.js:846:9)
    at /Users/me/repos/duty/node_modules/laravel-mix/node_modules/extract-text-webpack-plugin/dist/index.js:176:48
    at Array.forEach (<anonymous>)
    at /Users/me/repos/duty/node_modules/laravel-mix/node_modules/extract-text-webpack-plugin/dist/index.js:171:18
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/me/repos/duty/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:12:1)
    at AsyncSeriesHook.lazyCompileHook (/Users/me/repos/duty/node_modules/webpack/node_modules/tapable/lib/Hook.js:154:20)
    at Compilation.seal (/Users/me/repos/duty/node_modules/webpack/lib/Compilation.js:1242:27)
    at hooks.make.callAsync.err (/Users/me/repos/duty/node_modules/webpack/lib/Compiler.js:546:17)
    at _done (eval at create (/Users/me/repos/duty/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:9:1)
    at _err0 (eval at create (/Users/me/repos/duty/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:20:22)
    at _addModuleChain (/Users/me/repos/duty/node_modules/webpack/lib/Compilation.js:1093:12)
    at processModuleDependencies.err (/Users/me/repos/duty/node_modules/webpack/lib/Compilation.js:1005:9)
    at process.internalTickCallback (internal/process/next_tick.js:70:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`

Steps To Reproduce:

Not sure how to recommend recreating steps, but I have reinstalled node, updated everything related to laravel and laravel-mix.

Update

Since getting the issue I completely removed node_module globally. Still got same issue.
fresh install of node_module and npn install on dev
Changed the package.json to Laravel Github version ran npn install, all worked!

Most helpful comment

Laravel mix 3 does not support webpack 4.
Laravel mix v4 does

All 4 comments

Why you are using webpack v4?
Mix does not support v4.

I didn't see that anywhere on the installation info, but thank you for letting me know. I was using Webpack 4 for another project.

Why you are using webpack v4?
Mix does not support v4.

Well that's weird because I'm getting the same error but I'm using Laravel Mix v3, which has as its dependencies Webpack 4.26.1.

Version 3.0.0 supports Webpack 4 does it not?

Laravel mix 3 does not support webpack 4.
Laravel mix v4 does

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kpilard picture kpilard  ·  3Comments

jpmurray picture jpmurray  ·  3Comments

mstralka picture mstralka  ·  3Comments

pixieaka picture pixieaka  ·  3Comments

RomainGoncalves picture RomainGoncalves  ·  3Comments