Compatibility Note: LWR requires Node.js version >=18.0.0.
Note: If you've previously installed
create-lwr
globally, we recommend you uninstall the package usingnpm uninstall -g create-lwr
oryarn global remove create-lwr
to ensure the latest version is always used.
With NPM:
npm init lwr@latest
With Yarn:
yarn create lwr
Then follow the prompts!
You can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold a LWR + lwc-ts project, run:
# npm 6.x
npm init lwr@latest my-lwr-app --template lwc-ts
# npm 7+, extra double-dash is needed:
npm init lwr@latest my-lwr-app -- --template lwc-ts
# yarn
yarn create lwr my-lwr-app --template lwc-ts