async-labs / saas

Build your own SaaS business with SaaS boilerplate. Productive stack: React, Material-UI, Next, MobX, WebSockets, Express, Node, Mongoose, MongoDB. Written with TypeScript.
https://saas-app.async-await.com
MIT License
4.06k stars 674 forks source link

[chapter 3] Library issues #182

Closed michaelklem closed 2 years ago

michaelklem commented 2 years ago

Note, that I am not starting from the 3-begin project, but continuing from my work starting at 1-begin.

  1. 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.

  2. 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

klyburke commented 2 years ago

@michaelklem Thanks for noting.

  1. 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.

  2. 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.