angularjsangularjs-injector

Angular app error on 1 machine but works on others - Error: $injector:unpr Unknown Provider


I keep getting the bellow error when running my app on the same machine I've always been using (Windows).

Error: $injector:unpr Unknown Provider

On other machines it works fine, both Windows, MAC and Linux.

The website has no backend, so I'm only using NodeJS for compiling the front end with bower and grunt.

Even when I copy paste the generated build, I cannot run it on my machine, on Chrome or FireFox.

I tried removing my global npm and npm cache, cleaned and re-installed my bower and re-built the projects, started fresh with a new git checkout, copy paste existing builds, cleared browser cache and still nothing.

While all this used to work.

I cannot see this to be a code change as per the error suggested by AngularJS.

bower.json package.json


Solution

  • I was facing issues with my bower installation and the error messages were misleading.

    A particular library was a different version that those on the other machines, and a clean installation suffered from from version choices.

    Re-installing everything a while later helped, I'm assuming that some version dependencies were fixes in the 3rd party libraries.