Skip to content
Advertisement

_firebase_config__WEBPACK_IMPORTED_MODULE_3__.default.createUserWithEmailAndPassword is not a function in Vue Js

createUserWithEmailAndPassword function is not working for me. Below are my code –

config.js

JavaScript

useSignUp.js

JavaScript

Tried a number of things-

  1. Delete node modules and install them again.
  2. Change the version of firebase as well

Nothing working for me any solutions are appreciated.

Thanks in Advance!!

Advertisement

Answer

when you importing the config.js file inside useSignUp.js you are setting the whole object as projectAuth

what you need to do is following:

JavaScript

edit:

There is another way to work this around:

JavaScript

then inside the try block use this:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement