Errata: 1st Edition


#42

In chapter 19 on page 376 I had to add a forward slash at the end to this line in the example:

bootstrapPath + ‘stylesheets/’;

in order to get it to build.


#43

In Chapter 21 on page 403 I had to add this line at the very top of the app/model/witness.js example:

import Ember from ‘ember’;

otherwise I got an Ember not defined error message.


#44

On page 412 chapter 22 I couldn’t get the application.js file to compile kept getting error so I changed it
to the import used in the downloaded resources files for application.js and it worked.

// book is wrong – import JSONAPIAdapter from ‘ember-data/adapters/json-api’;

//use this import from the file in downloaded resources

import DS from ‘ember-data’;

export default DS.JSONAPIAdapter.extend({
host: ‘https://bnr-tracker-api.herokuapp.com’,
namespace: ‘api’
});


#45

Hello all, though this is not technically errata, I wanted to let you know that the coffeerun API endpoint is currently down.

We’re working to redeploy it.
Thanks for your patience!


#46

As of 5:26pm EST, the CoffeeRun API is back up.

Apologies for the inconvenience!


#47

On page 84 we are told to add the line div class=“detail-image-frame”. However, on page 104 when adding data-image-role=“target” if you look at the non-bold code on the line above it says div class=“detail-image-wrapper” . This should be div class=“detail-image-frame” as we were never instructed to change this field between those pages.

Edited to remove less-than and greater-than signs as they were not showing up.


#48

I also can’t get querySelectorAll to work in chapter 6 but I am using brower-sync. Do you think your fix, the DomContentLoaded, would help me? If so, where do you add it? I tried it in the Chrome developer tools, but it didn’t make a difference. Mine returns {a, a, a, a, a}.


#50

I got a similar problem and found out that I made $ equal to JQuery instead of jQuery


#51

I am on page 342 and I was getting an unexpected token error on the console when I sent a message through the wscat terminal I had open. It looks like the JSON.parse line was messing up and after some looking I came to the conclusion that it already was a JSON object and didn’t need to be parsed. I changed the line on page 341 from
let data = JSON.parse(e.data);
to let data = e.data;

and I haven’t had any issues so far.


#52

Edit: not an error, explained below

Chapter 8, page 183 (Coffeerun):

The code for Truck.prototype.printOrders uses a foreach() to iterate through the list of coffee orders.
The foreach() loop uses this.db to access items from the datastore, but this is not available by default inside a foreach (you have to pass in an argument for what the function should use as this)

The following code works:
customerIdArray.forEach(function (id) {
console.log(this.db.get(id));
},this); // have to pass this in to forEach if we want to use it

the only addition is ,this as an additional argument to forEach


#53

Hi @norrisa, hang tight for page 189 :slight_smile: this is not a typo, but an intentional lead-in for the debugging that follows for the next 7 pages. On page 189, we use the .bind() function to resolve the issue, but your solution also works (check out page 195 "For the More Curious).


#54

Thanks! Appreciate the explanation.
Once I saw an error in the dev console, I went straight to trying to isolate the problem. It simply didn’t occur to me to continue reading the page past that point.


#55

Do we have to search the errata here, or is there a chapter by chapter update somewhere?


#58

Hi @Dekard, at the moment we don’t have a compilation, sorry! But if you hit Cmd-F (on mac) and check “Search this topic”, you can search by “chapter 18” — hope that helps!


#59

Hi, @chrisaquino1, perhaps you could trash this notice and its predecessor in order to keep the errata area succinct.

(Oh, this isn’t threaded – I was referring to you March 7 posts)


#61

Chapter 1 p 31

The wording where the favicon.ico is placed should say to the left of the title instead of the


#62

My bad it’s Chapter 2 p 31


#63

Found a small typo on page 21 of the ebook. The paragraph beginning with “Let’s examine your code…”. I believe the second last sentence of that paragraph is missing the word on i.e. it should read "differently based on the doctype instead of “differently based the doctype”.


#64

Small grammatical error I think. On page 37 of the ebook on the 3rd last paragraph the fourth sentence goes:-

…with a selector of higher specificity will be used instead styles whose selector has a lower specificity.

I think the word of is missing. It should read as follows:-

…with a selector of higher specificity will be used instead of styles whose selector has a lower specificity.


#65

Grammar mishaps.

On pg 145; in the 2nd paragraph (after the code snippet) the 2nd sentence has the word value instead it should be values the plural i.e.

When these values are the same, you call hideDetails.

On pg 155 in the section Triggering transitions with JavaScript The 2nd paragraph of this section (i.e.after the code snippet) the word to in the last sentence ought to be omitted; i.e. it should read:-

…changes that trigger the transition