505970 (10) [Avatar] Offline
I'm following along with the book using typescript. after moving the files according to figure 2.19. I'm getting two error and those error messages are "Error [app-router] Error: Script error for "Aurelia-fetch-client", needed by: services/book-api" and "http 404: not found - the server has not found anything matching the requested URI (Uniform Resource Identifier). get - http://localhost:9000/src/aurelia-fetch-client.js'.

I have double checked all of the references and paths to all files and resources and cannot figure out why it cannot get to the resource.


I found that this error will be caused if Aurelia-fetch-client is not installed or not listed in the Aurelia.json. Thanks!
Sean Hunter (29) [Avatar] Offline
Thanks for posting on the forum. Let me take a look at it and I'll get back to you.
Sean Hunter (29) [Avatar] Offline
It looks like you're missing the Aurelia fetch client dependency. I'll have to review the instructions around this to make sure they are clear.

You can install this by stopping the Aurelia CLI run watch, and running the following commands:

au install aurelia-fetch-client
au run --watch

After running this command you should see the NPM package installed under the following path:


And, you should have the following entry in your aurelia.json file under the dependencies node:

            "name": "aurelia-fetch-client",
            "main": "aurelia-fetch-client",
            "path": "../node_modules/aurelia-fetch-client/dist/amd",
            "resources": []

You can cross check your aurelia.json file against this copy:


Let me know how it goes smilie.

505970 (10) [Avatar] Offline
Thanks installing the dependency corrected the issue.
Sean Hunter (29) [Avatar] Offline
Ah that's great to hear. I'm glad that this resolved the issue.