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

How to fix ReferenceError: insertState is not define #12

Open
Ksoftcode opened this issue Sep 18, 2020 · 0 comments
Open

How to fix ReferenceError: insertState is not define #12

Ksoftcode opened this issue Sep 18, 2020 · 0 comments

Comments

@Ksoftcode
Copy link

Hi Dumbape, I'm trying to gain access to the Login Page but it gives giving me this error upon the loading of the main.js file. I have done the necessary configuration in the db_controller file.

Error message.....
Communications@DESKTOP-RHC1CHH MINGW64 /c/xampp/htdocs/HIMS
$ node main.js
C:\xampp\htdocs\HIMS\controllers\db_controller.js:85
insertState('Ilorin', 'Kwara', function(interState){
^

ReferenceError: insertState is not defined
at module.exports (C:\xampp\htdocs\HIMS\controllers\db_controller.js:85:2)
at Object. (C:\xampp\htdocs\HIMS\main.js:67:1)
at Module._compile (internal/modules/cjs/loader.js:1157:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
at Module.load (internal/modules/cjs/loader.js:1001:32)
at Function.Module._load (internal/modules/cjs/loader.js:900:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js
:74:12)
at internal/main/run_main_module.js:18:47

code......
module.exports = function(resetSystem){

// delete data from all tables
  //	clearTable('city_state');
 //	clearTable('complain');
 //	clearTable('curr');
 //	clearTable('doctor');
 //	clearTable('employee');
  //	clearTable('employee_contact');
 //	clearTable('employee_email');
  //	clearTable('hardware');
  //	clearTable('login');
 //	clearTable('nurse');
 //	clearTable('patient');
 //	clearTable('record');
 //	clearTable('room');
 //	clearTable('server');
 //	addServer();

insertState('Bangalore', 'Karnataka', function(){
	insertEmployee(1000,'Admin','male',0.00,'Manager',1234567890,adminDetails.emailId,'Somewhere on Earth','Bangalore', function(){
		const pass = adminDetails.password;
		bcrypt.hash(pass, 10, function (err, hash) {
			insertLogin(1000, hash);
		});
	});
})
}
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

1 participant