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

TypeError: Cannot read property 'tap' of undefined with latest version #17

Closed
lukemiller93 opened this issue Oct 28, 2020 · 12 comments
Closed
Labels

Comments

@lukemiller93
Copy link

lukemiller93 commented Oct 28, 2020

/mnt/c/Users/luke/Local Sites/electrify/app/public/wp-content/plugins/cbc-blocks/blocks/testimonial/node_modules/ignore-emit-webpack-plugin/index.js:64
                compilation.hooks.processAssets.tap({

TypeError: Cannot read property 'tap' of undefined
    at /mnt/c/Users/luke/Local Sites/electrify/app/public/wp-content/plugins/cbc-blocks/blocks/testimonial/node_modules/ignore-emit-webpack-plugin/index.js:64:49
    at SyncHook.eval [as call] (eval at create (/mnt/c/Users/luke/Local Sites/electrify/app/public/wp-content/plugins/cbc-blocks/blocks/testimonial/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)        
    at SyncHook.lazyCompileHook (/mnt/c/Users/luke/Local Sites/electrify/app/public/wp-content/plugins/cbc-blocks/blocks/testimonial/node_modules/tapable/lib/Hook.js:154:20)
    at Compiler.newCompilation (/mnt/c/Users/luke/Local Sites/electrify/app/public/wp-content/plugins/cbc-blocks/blocks/testimonial/node_modules/webpack/lib/Compiler.js:631:26)
    at /mnt/c/Users/luke/Local Sites/electrify/app/public/wp-content/plugins/cbc-blocks/blocks/testimonial/node_modules/webpack/lib/Compiler.js:667:29
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/mnt/c/Users/luke/Local Sites/electrify/app/public/wp-content/plugins/cbc-blocks/blocks/testimonial/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:4:1)
    at AsyncSeriesHook.lazyCompileHook (/mnt/c/Users/luke/Local Sites/electrify/app/public/wp-content/plugins/cbc-blocks/blocks/testimonial/node_modules/tapable/lib/Hook.js:154:20)
    at Compiler.compile (/mnt/c/Users/luke/Local Sites/electrify/app/public/wp-content/plugins/cbc-blocks/blocks/testimonial/node_modules/webpack/lib/Compiler.js:662:28)
    at /mnt/c/Users/luke/Local Sites/electrify/app/public/wp-content/plugins/cbc-blocks/blocks/testimonial/node_modules/webpack/lib/Watching.js:77:18
    at _next0 (eval at create (/mnt/c/Users/luke/Local Sites/electrify/app/public/wp-content/plugins/cbc-blocks/blocks/testimonial/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:14:1)
    at eval (eval at create (/mnt/c/Users/luke/Local Sites/electrify/app/public/wp-content/plugins/cbc-blocks/blocks/testimonial/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:22:1)
    at LiveReloadPlugin.serverStarted (/mnt/c/Users/luke/Local Sites/electrify/app/public/wp-content/plugins/cbc-blocks/blocks/testimonial/node_modules/webpack-livereload-plugin/index.js:89:9)
@helgatheviking
Copy link

helgatheviking commented Oct 28, 2020

Seeing the same! Looks like a similar usage too... Linux subsystem? And running wp-scripts to compile a WordPress plugin?

helga@Lexa:/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies$ sudo npm run build

> radio-buttons-for-taxonomies@2.1.0 build /mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies
> wp-scripts build

/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/ignore-emit-webpack-plugin/index.js:64
                compilation.hooks.processAssets.tap({
                                                ^

TypeError: Cannot read property 'tap' of undefined
    at /mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/ignore-emit-webpack-plugin/index.js:64:49
    at SyncHook.eval [as call] (eval at create (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:9:1)
    at SyncHook.lazyCompileHook (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/tapable/lib/Hook.js:154:20)
    at Compiler.newCompilation (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/webpack/lib/Compiler.js:631:26)
    at hooks.beforeCompile.callAsync.err (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/webpack/lib/Compiler.js:667:29)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/tapable/lib/Hook.js:154:20)
    at Compiler.compile (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/webpack/lib/Compiler.js:662:28)
    at readRecords.err (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/webpack/lib/Compiler.js:321:11)
    at Compiler.readRecords (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/webpack/lib/Compiler.js:529:11)
    at hooks.run.callAsync.err (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/webpack/lib/Compiler.js:318:10)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/tapable/lib/Hook.js:154:20)
    at hooks.beforeRun.callAsync.err (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/webpack/lib/Compiler.js:315:19)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at AsyncSeriesHook.lazyCompileHook (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/tapable/lib/Hook.js:154:20)
    at Compiler.run (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/webpack/lib/Compiler.js:312:24)
    at processOptions (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/webpack-cli/bin/cli.js:353:14)
    at yargs.parse (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/webpack-cli/bin/cli.js:364:3)
    at Object.parse (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/webpack-cli/node_modules/yargs/yargs.js:576:18)
    at /mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/webpack-cli/bin/cli.js:49:8
    at Object.<anonymous> (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/webpack-cli/bin/cli.js:366:3)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/mnt/c/Users/helga/Local Sites/sandbox/app/public/wp-content/plugins/Radio-Buttons-for-Taxonomies/node_modules/webpack/bin/webpack.js:156:2)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! radio-buttons-for-taxonomies@2.1.0 build: `wp-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the radio-buttons-for-taxonomies@2.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-10-28T22_36_47_365Z-debug.log

@helgatheviking
Copy link

I rolled back with npm install ignore-emit-webpack-plugin@2.0.3 --save-dev and the WP scripts work again. npm run build actually builds something.

@kerm1it
Copy link

kerm1it commented Oct 29, 2020

I have the same problem.

I think you should revert it and publish a patch version.

If you need to support webpack 5, you should publish a major version. Because it has some break changes.

@temoedjin
Copy link

Same problem here.
If you could publish it as a major version that would be perfect. Now changed the dependency to point to a specific minor version (so similar to @helgatheviking )

@ankitrox
Copy link

Similar issue here, however solution suggested by @helgatheviking seems to be working fine.

@yoyo837
Copy link

yoyo837 commented Oct 30, 2020

@mrbar42

@Stanzilla
Copy link

Yep, same here

@mrbar42
Copy link
Owner

mrbar42 commented Nov 4, 2020

Should be fixed in https://github.com/mrbar42/ignore-emit-webpack-plugin/releases/tag/v2.0.5

@Stanzilla
Copy link

Stanzilla commented Nov 9, 2020

@mrbar42 in 2.0.5 it's

[webpack-cli] Compilation finished
Unhandled rejection TypeError: Cannot read property 'source' of undefined
    at /home/stan/projects/work/platform-documentation/mkdocs-material/node_modules/webpack/lib/SourceMapDevToolPlugin.js:187:47

@gziolo
Copy link

gziolo commented Nov 9, 2020

I see a different issue with v2.0.5 and webpack 4, it works properly with v2.0.3:

TypeError: Cannot destructure property 'info' of 'TerserPlugin.getAsset(...)' as it is undefined.
    at TerserPlugin.taskGenerator (/Users/gziolo/Projects/esnext-example/node_modules/terser-webpack-plugin/dist/index.js:183:7)
    at taskGenerator.next (<anonymous>)
    at /Users/gziolo/Projects/esnext-example/node_modules/terser-webpack-plugin/dist/index.js:455:49
    at /Users/gziolo/Projects/esnext-example/node_modules/p-try/index.js:4:10
    at new Promise (<anonymous>)
    at pTry (/Users/gziolo/Projects/esnext-example/node_modules/p-try/index.js:3:37)
    at run (/Users/gziolo/Projects/esnext-example/node_modules/terser-webpack-plugin/node_modules/p-limit/index.js:24:18)
    at /Users/gziolo/Projects/esnext-example/node_modules/terser-webpack-plugin/node_modules/p-limit/index.js:46:18
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

@mrbar42
Copy link
Owner

mrbar42 commented Nov 23, 2020

@gziolo Please re-check with the latest v2.0.6

@gziolo
Copy link

gziolo commented Nov 23, 2020

@mrbar42, I tested locally with the new version and I can confirm that it works correctly with v2.0.6. Thank you for fixing this issue 🎉

@mrbar42 mrbar42 closed this as completed Nov 23, 2020
@mrbar42 mrbar42 added the bug label Nov 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants