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

mailosaur webpack compilation error #49

Closed
mysticdevx opened this issue Nov 3, 2021 · 2 comments
Closed

mailosaur webpack compilation error #49

mysticdevx opened this issue Nov 3, 2021 · 2 comments

Comments

@mysticdevx
Copy link

Platform: node v14.17.3 on MacOS v11.6, webpack: 5.60.0

I am working on a project with typescript. We are planning to use Mailosaur. I start implementing but I got a compilation error when I run the script. below is the error message I got:

Error: Webpack Compilation Error
Module not found: Error: Can't resolve 'net' in '/Users/xxxxxx/node_modules/https-proxy-agent/dist'

Module not found: Error: Can't resolve 'tls' in '/Users/xxxxxx/https-proxy-agent/dist'

Module not found: Error: Can't resolve 'https' in '/Users/xxxxxx/node_modules/mailosaur/lib'

Can anyone suggest a solution or a workaround?

@ad-mailosaur
Copy link
Contributor

Hi,
Can you provide some steps to reproduce this issue?
Thanks

@mysticdevx
Copy link
Author

Hi, thank you for the reply. It was a webpack polyfill problem and I have solved this by adding fallback for webpack.config.js as follows:

// fallback
      tls: false,
      net: false,
      https: false,
      http: false,
      buffer: require.resolve('buffer/')
//plugin for Buffer
    new webpack.ProvidePlugin({
      Buffer: ['buffer', 'Buffer'],
    }),

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

2 participants