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 #178

Closed
softmarshmallow opened this issue Dec 10, 2020 · 7 comments
Closed

TypeError: Cannot read property 'tap' of undefined #178

softmarshmallow opened this issue Dec 10, 2020 · 7 comments

Comments

@softmarshmallow
Copy link

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
 
@softmarshmallow
Copy link
Author

@softmarshmallow
Copy link
Author

I added caching: false and it's gone now

@PenguinOfWar
Copy link
Contributor

Thanks @softmarshmallow for advising of the fix. Can I recommend you close this issue?

@jschuur
Copy link

jschuur commented Jan 7, 2021

I just ran into the same issue, and was able to fix it with caching: false, but shouldn't this plugin work out of the box without having to add a custom setting?

Disabling caching doesn't seem like something I want to do.

I switched from serverless-webpack to serverless-bundle, is it somehow conflicting with old cache content? I couldn't find any legacy cache directory in my project.

@jschuur
Copy link

jschuur commented 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.

@PenguinOfWar
Copy link
Contributor

Thanks @jschuur for the additional information.

Pinging @jayair to close.

@jayair
Copy link
Member

jayair commented Jan 7, 2021

Thanks @PenguinOfWar

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

4 participants