Hola! I created my sst using `--language typescrip...
# sst
b
Hola! I created my sst using
--language typescript
but I failed to read through docs to add
--use-yarn
and my
sst add-cdk
is complaining (and using npm). Where is this set? I’d like to change this after the boilerplating my project 🙏
t
You shouldn't have to do much besides delete package-lock.json and run yarn
b
note: I’m using a monorepo which hoists, so there is no
yarn.lock
so “Note, that it’ll use Yarn instead if it detects a yarn.lock file in your project.”
isn’t there
issue is that
sst add-cdk
is reading
npm
true in https://github.com/serverless-stack/serverless-stack/blob/master/packages/cli/scripts/add-cdk.js#L8 (I imagine) In any case,
sst add-cdk
tries an
npm install..
not yarn
I can dig up where
cliInfo
is getting it’s
npm
true from, but figured I’d poke here
t
I just recently fixed this to scan upwards for yarn.lock
This might not be getting called for that function though - slowly starting to refactor some of these things into separate modules in core
b
I doubt supporting rushjs.io would be a priority here (lockfile is located in
/common/config/yarn.lock
)
maybe I’ll have more luck just tapping into Packager or interrogating the cli directly in a mono-repo specific command
t
Oh this code looks for a lock file upwards through parent directories
if it's somewhere else we won't be able to detect yarn
b
exactly
t
we might just need to support setting
yarn: true
in
sst.json
b
yeah, that was my first thought
t
I'll make an issue
b
you do see that a lot these day