question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read property 'tap' of undefined

See original GitHub issue
sls offline
Serverless: To ensure safe major version upgrades ensure "frameworkVersion" setting in service configuration (recommended setup: "frameworkVersion: ^2.9.0")

Serverless: Load command interactiveCli
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command config:tabcompletion
Serverless: Load command config:tabcompletion:install
Serverless: Load command config:tabcompletion:uninstall
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command upgrade
Serverless: Load command uninstall
Serverless: Load command webpack
Serverless: Load command dynamodb
Serverless: Load command dynamodb:migrate
Serverless: Load command dynamodb:seed
Serverless: Load command dynamodb:start
Serverless: Load command dynamodb:noStart
Serverless: Load command dynamodb:remove
Serverless: Load command dynamodb:install
Serverless: Load command offline
Serverless: Load command offline:start
Serverless: Load command create_domain
Serverless: Load command delete_domain
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command generate-event
Serverless: Load command test
Serverless: Load command dashboard
Serverless: Load command output
Serverless: Load command output:get
Serverless: Load command output:list
Serverless: Load command param
Serverless: Load command param:get
Serverless: Load command param:list
Serverless: Load command studio
Serverless: Invoke offline
Serverless: Invoke webpack:validate
serverless-bundle: CommonJS, ES3, or ES5 are not supported
Serverless: Bundling with Webpack...
 
  Type Error ---------------------------------------------
 
  TypeError: Cannot read property 'tap' of undefined
      at Object.exports.tap (/Users//Documents/GitHub/services/node_modules/hard-source-webpack-plugin/lib/util/plugin-compat.js:118:25)
      at new CacheSerializerFactory (/Users//Documents/GitHub/services/node_modules/hard-source-webpack-plugin/lib/CacheSerializerFactory.js:94:18)
      at HardSourceWebpackPlugin.apply (/Users//Documents/GitHub/services/node_modules/hard-source-webpack-plugin/index.js:219:36)
      at createCompiler (/Users//Documents/GitHub/services/node_modules/serverless-webpack/node_modules/webpack/lib/webpack.js:69:12)
      at create (/Users//Documents/GitHub/services/node_modules/serverless-webpack/node_modules/webpack/lib/webpack.js:113:15)
      at webpack (/Users//Documents/GitHub/services/node_modules/serverless-webpack/node_modules/webpack/lib/webpack.js:137:31)
      at f (/Users//Documents/GitHub/services/node_modules/serverless-webpack/node_modules/webpack/lib/index.js:35:15)
      at ServerlessPlugin.wpwatch (/Users//Documents/GitHub/services/node_modules/serverless-webpack/lib/wpwatch.js:46:22)
  From previous event:
      at PluginManager.invoke (/Users//.nvm/versions/node/v12.18.0/lib/node_modules/serverless/lib/classes/PluginManager.js:510:22)
      at /Users//.nvm/versions/node/v12.18.0/lib/node_modules/serverless/lib/classes/PluginManager.js:545:24
  From previous event:
      at PluginManager.run (/Users//.nvm/versions/node/v12.18.0/lib/node_modules/serverless/lib/classes/PluginManager.js:545:8)
      at /Users//.nvm/versions/node/v12.18.0/lib/node_modules/serverless/lib/Serverless.js:170:33
      at processImmediate (internal/timers.js:456:21)
      at process.topLevelDomainCallback (domain.js:137:15)
  From previous event:
      at Serverless.run (/Users//.nvm/versions/node/v12.18.0/lib/node_modules/serverless/lib/Serverless.js:157:74)
      at /Users//.nvm/versions/node/v12.18.0/lib/node_modules/serverless/scripts/serverless.js:50:26
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              12.18.0
     Framework Version:         2.9.0
     Plugin Version:            4.1.1
     SDK Version:               2.3.2
     Components Version:        3.3.0
 

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jschuurcommented, Jan 7, 2021

I got it working without needing caching: false once I realised that I still had a newer webpack installed locally from when i used serverless-webpack. Once I removed that, it was all good.

2reactions
softmarshmallowcommented, Dec 11, 2020

I added caching: false and it’s gone now

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'tap' of undefined #5781
I need to install webpack for react-styleguidist, but it seems if the version doesn't match the one Next is using this error occurs....
Read more >
ProgressPlugin TypeError: Cannot read property 'tap' of ...
In my case the error was that I put a plugin under resolve.plugins , instead of directly in plugins inside the webpack config....
Read more >
Cannot read property 'tap' of undefined in ts-loader #14157
Describe the bug. Module build failed (from ./node_modules/ts-loader/index.js): TypeError: Cannot read property 'tap' of undefined. To Reproduce ...
Read more >
Webpack: Cannot read property 'tap' of undefined-Reactjs
Coding example for the question React- Webpack: Cannot read property 'tap' of undefined-Reactjs.
Read more >
TypeError: Cannot read property 'tap' of undefined - 掘金
执行打包操作时报错;原因:html-webpack-plugin 插件版本安装不兼容解决方法: 安装html-webpack-plugin 版本为4.5.0.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found