Closed michaelklem closed 2 years ago
@michaelklem Thanks for noting.
Throughout the book, we do not give explicit instructions to add new packages. For each chapter, we put all necessary packages in the "begin" codebase. We instruct readers to start with the "begin" codebase and run yarn
to install all necessary packages for the chapter. You could compare the "begin" codebases from one chapter to the next to see which new packages you need to install, if you want to continue building from your 1-begin
codebase.
Good catch! That is a typo in the book text. In the chapter 3 codebases, we have "ts-node": "^10.8.1"
in our package.json
files. That version of ts-node
(as well as 10.9.1 as you demonstrated) works. But if you try to run the 3-end
codebase with "ts-node": "^9.1.1"
- you are right, the code does not compile. I will fix that typo in the book text.
Note, that I am not starting from the 3-begin project, but continuing from my work starting at 1-begin.
There is no mention of adding express or isomorphic-unfetch module. They are just part of the initial package.json file for the 3-begin code base. Coming from the 1-begin code base, there is no mention of the libraries express or isomorphic-unfetch to the project.
Unable to compile server.ts until I updated the ts-node library as per: https://stackoverflow.com/questions/72488958/false-expression-non-string-value-passed-to-ts-resolvetypereferencedirective In chapter 3 you state to do the following: yarn add nodemon@^2.0.7 ts-node@^9.1.1 --dev
I was unable to get server.ts to successfully compile until I did the following to update the ts-node library.: yarn upgrade ts-node-dev@latest ts-node@latest
which upgraded ts-node to 10.9.1 and then the server.ts code compiled.
Thanks