trying my hand with live lambda/sst using typescri...
# sst
l
trying my hand with live lambda/sst using typescript, and getting the following error. Any way to configure where the
tsconfig.json
should be referenced?:
Resolve error: ENOENT: no such file or directory, stat './tsconfig.json'
f
hey @Luke Wyman, are you getting this on
sst start
?
Btw, are you setting the
srcPath
for your functions?
l
yes on the first Q, no on the second.
part of the fun and games here is refitting lerna-yarn-starter to be a typescript project
f
Ah I see. Do you have a tsconfig.json at the root?
l
I do in that project, yes. I created the project by doing a
yarn create serverless-stack karaoke-backend-sst --language typescript
, and then structuring it like
lerna-yarn-starter
. I've tried that again from scratch, going incrementally, and was able to make a simple service and function in
src/services/greetings
with a function called
hello.ts
. That one I'm able to get to work just fine and it seems things are going better if I start small and work incrementally. I think what I'm trying to wrap my head around is: 1. I haven't needed lerna yet, so I'm not sure how that's going to for monorepo. What am I not seeing that it's doing what I want so far? 2. The basics of typescript are working now, but since that's all included in sst, I'm flying a little blind about how to enhance my
tsconfig
,
.eslintrc.js
, prettier, etc.
f
1. I haven’t needed lerna yet, so I’m not sure how that’s going to for monorepo.
Lerna is primarily for managing the package versions, especially if you plan to publish some of ur packages. It also has a diff command that shows which packages have changed since a given commit
2. how to enhance my 
tsconfig
.eslintrc.js
, prettier
You can configure linting through
.eslintrc.json
. Or u can turn off linting in SST and manage linting urself. And you have full control over type checking and prettier. More details here - https://docs.serverless-stack.com/working-locally#linting--type-checking
l
Thanks, Frank!