mostafa-hz / firebase-dynamic-links

unofficial package to create firebase dynamic links
MIT License
15 stars 4 forks source link

importing the firebase-dynamic-link package produce error #3

Open kalpiBansal opened 2 years ago

kalpiBansal commented 2 years ago

If you want to include a polyfill, you need to:

mostafa-hz commented 2 years ago

@kalpiBansal I'm not familiar with polyfill, so please can you provide an example. and please tell me if you have any possible solution.

warrendodsworth commented 2 years ago

./node_modules/firebase-dynamic-links/lib/firebase-dynamic-links.js:13:16-32 - Error: Module not found: Error: Can't resolve 'https' in '/node_modules/firebase-dynamic-links/lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:

Build output when added to an angular project

evellior commented 1 year ago

I'm getting the same error in a React project, it's not to do with either Angular or React. The error is because you're importing something from 'https' (here), but that package isn't global to everyone's environment and it's not being bundled in when you package your project for distribution.

I believe the solution would be to either explicitly add 'https' to the dependencies or to add a webpack config file to your project and (as the error above says) define a fallback to use when the package is installed. I'll fork and give this a shot myself.

mostafa-hz commented 1 year ago

@evellior thanks for the clarification, I will try to solve the problem as soon as I find time. meanwhile, please feel free to open a PR if you solved the problem.

mostafa-hz commented 1 year ago

@kalpiBansal can you please check if #8 solves the problem?