[SOLVED] [Unknown Provider] error after deploying scaffolded webapp

After selecting any library from the list provided by “yo openmrs-owa” in the OWA generator, it successfully creates / generates all the required files needed to build a webapp (scaffolding) in the particular directory. It also doesn’t show any building or deploying errors. But at the time of selecting the particular webapp from the owa module (in the openmrs running instance), it gives a blank page showing errors in the console window. The error is described at :

After going through the link which is provided in the console, I ensured certain things like whether the module is declared only once or not, whether there is any service which is not declared properly. I also tried adding the .config function in the main.js file for the “uiRouter”, but none of them served any help !!

At first the error was only while selecting the AngularJs library but later on I encountered this error in using almost every library (both in jquery and react ). then , i concluded that its not the fault in the coding part. So, I tried experimenting over the various nodejs version. As mentioned in the package.json file, I tried installing node 7.4.0 which took me more than one day because it was difficult at first to delete all the files of the latest version of the nodeJs (and without removing, it wasnt installing older version properly). After trying enough in windows, I switched to linux. There also i experimented with various versions of the node and the npm.

Note: npm version must be in accordance with the node version otherwise it may lead to unwanted and unidentified errors !

For installing node, I would recommend everyone to never install nodejs with the inbuilt apt command or never use “brew” for installing node (it consumes at lot of time to remove all the previous files if u want to install some other version) I would recommend using “nvm” (node version manager) in linux for installing node and npm. Its easy to install as well as we can manage different versions of node at a time !! (so, always use nvm)

Now, after checking different versions of npm, I still got the same error !

Then, I tried experimenting with the standalone platform of the openmrs. While using standalone platform of openmrs, I encountered a different type of error and it was “error 404: Page not found”. It wasnt fetching the index.html file.

And, now I guess the error is with the different platforms of the openmrs. So, now i am going to try the latest openmrs version by cloning it. (hoping to get the solution)

Its been around more than 5 days trying to solve this issue !! Without solving this issue, I cant go further in this project. If there is any solution to this issue in the minds of anyone in the community, it would be appreciable. It may save a lot of time for me !!

Thanks, Ankit kumar

You need to tell us the exact version of the standalone or platform that you are using to get this error. It would also help if you paste the tomcat log contents at pastebin.com

Thanks for jumping in @dkayiwa! It was actually solved with this: