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

Compatibility issue with webpack > 4.28.3 #304

Open
lummerland opened this issue Jan 17, 2019 · 5 comments
Open

Compatibility issue with webpack > 4.28.3 #304

lummerland opened this issue Jan 17, 2019 · 5 comments

Comments

@lummerland
Copy link

lummerland commented Jan 17, 2019

Since the compile error generally seems to come up on webpack 4 compatibility issues I post this issue here. Hope this is right ;)
I encountered the error when I run "mocha-webpack" (with mocha-webpack ^1.1.0 and webpack 4.28.4). This doesn't happen with webpack 4.28.3.


Error: Chunk.parents: Use ChunkGroup.getParents() instead
    at Chunk.get (/home/my/code/node_modules/webpack/lib/Chunk.js:827:9)
    at /home/my/code/node_modules/mocha-webpack/lib/webpack/util/sortChunks.js:24:15
    at Array.forEach (<anonymous>)
    at sortChunks (/home/my/code/node_modules/mocha-webpack/lib/webpack/util/sortChunks.js:23:10)
    at getBuildStats (/home/my/code/node_modules/mocha-webpack/lib/webpack/util/getBuildStats.js:28:47)
    at TestRunner.prepareMocha (/home/my/code/node_modules/mocha-webpack/lib/runner/TestRunner.js:141:52)
    at /home/my/code/node_modules/mocha-webpack/lib/runner/TestRunner.js:193:36
    at /home/my/code/node_modules/mocha-webpack/lib/webpack/compiler/registerReadyCallback.js:26:7
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/my/code/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:18:1)
    at AsyncSeriesHook.lazyCompileHook (/home/my/code/node_modules/tapable/lib/Hook.js:154:20)
    at emitRecords.err (/home/my/code/node_modules/webpack/lib/Compiler.js:261:22)
    at Compiler.emitRecords (/home/my/code/node_modules/webpack/lib/Compiler.js:375:39)
    at emitAssets.err (/home/my/code/node_modules/webpack/lib/Compiler.js:255:10)
    at hooks.afterEmit.callAsync.err (/home/my/code/node_modules/webpack/lib/Compiler.js:361:14)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/my/code/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:20:1)
    at AsyncSeriesHook.lazyCompileHook (/home/my/code/node_modules/tapable/lib/Hook.js:154:20)
    at asyncLib.forEach.err (/home/my/code/node_modules/webpack/lib/Compiler.js:358:27)
    at /home/my/code/node_modules/neo-async/async.js:2825:7
    at done (/home/my/code/node_modules/neo-async/async.js:2861:11)
    at /home/my/code/node_modules/neo-async/async.js:2813:7
    at MemoryFileSystem.writeFile (/home/my/code/node_modules/memory-fs/lib/MemoryFileSystem.js:328:9)
    at writeOut (/home/my/code/node_modules/webpack/lib/Compiler.js:342:29)
    at Immediate._onImmediate (/home/my/code/node_modules/memory-fs/lib/MemoryFileSystem.js:288:4)
    at processImmediate (timers.js:632:19)```
@rjnienaber
Copy link

My project is fairly simple so until this is fixed for the latest webpack, my workaround is to use nodemon:

  "scripts": {
    "build": "webpack --target node --mode production",
    "test": "npm run build && mocha",
    "test:watch": "nodemon -i dist/ --exec npm test"
  },

@yakubenko
Copy link

yakubenko commented Jan 18, 2019

I have the same error with Webpack 4.28.4
UPD: This fork doesn't have the problem. https://github.com/sysgears/mochapack

@SimonBrodtmann
Copy link

SimonBrodtmann commented Jan 29, 2019

Same here. Mochapack doesn't look more active. 1 contributor. 1 version. 1 commit.
Version 2.0.0-beta.0 fixes the problem so I guess that's the reason why mochapack works as well.

@EmperorArthur
Copy link

Reporting the same error as well. Trying to follow the instructions for testing a Vue project which uses Laravel mix.

@larssn
Copy link

larssn commented Oct 11, 2019

Fix: npm i mocha-webpack@next

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