Hello! What is the recommended command to create a...
# help
ö
Hello! What is the recommended command to create an sst app using TypeScript as language and yarn as packager?
npx create-serverless-stack@latest my-app --use-yarn --language typescript
vs
yarn create serverless-stack my-app --language typescript
And what is the recommended way to run scripts?
npx sst start
vs
yarn sst start
vs
yarn start
(referencing the script in
package.json
)
r
I think it comes down to personal preference of npm vs yarn
ö
All of the above commands use yarn though
r
Npx doesn't
Script vs direct I suspect is a preference, script gives you more flexibility
t
You actually also have to pass
--use-yarn
with the
yarn create
example
We should probably infer that to be true in that situation
I personally make scripts in package.json for the commands I typically use (especially if I need to set the aws profile or stage) Will have stuff like
yarn sst:start
ö
Do I need to pass --use-yarn when I execute
yarn create
? Because I tried that, but as far as I remember it used yarn as the packager, i.e.,
yarn.lock
was present, and
package-lock.json
was missing.
t
oh interesting