carpiediem
carpiediem

Reputation: 2038

Why don't AngularJS $resources resolve on my machine?

I have an AngularJS application that is running reliably on production and has no problems on my coworker's development machines. But when the app runs on my MacBook, it freezes after the first API call.

Here's what I see:

  1. UI interactions are executing controller functions.
  2. Functions are calling factory functions like Company.get() and passing in parameters, success callback, and error callback as arguments.
  3. The $resource instances inside the factories are triggering network requests.
  4. These network requests look successful in the browser dev panel (200 response with correct data).
  5. Neither callback is ever triggered.
  6. The app remains in a loading state until the page is refreshed.

Again, #5 & #6 only occur when run in a dev environment on my machine (specs below). The production website runs fine in the same browser. Code from the same git commit has no problems on my coworkers' machines.

So, this would seem to be an issue with what I have (or do not have) installed or configured on my machine. But, I can't seem to find anything out of the ordinary. The build process has no messages that seem related. I've rolled back my node version to match my coworker. I've deleted the entire repository to download and install fresh. I've restarted my computer. Nothing works. The best clue I've found is that livereload is also broken on my machine. But, it's not clear to me how that would be related.

I'd love to get some new ideas on how I might fix this.

My specs: MacOS 11.2.2 Chrome 88 Node.js (I've tried versions 14, 10, 8) AngularJS (including angular-resource) 1.5.8, grunt1.0.4 w/ CLI 1.3.2, grunt-express-server^0.5.3, bower 1.8.8, connect-livereload~0.6.0

Upvotes: 0

Views: 14

Answers (0)

Related Questions