12 June 2022

Installing Preact two ways shown. At first the official way did not work for me. I had to fix permissions for the global node modules, official solution. Then the alternative way worked, and after that was done the official way started to work too.

Source code viewer
  1. # Official way.
  2. npx preact-cli create <template-name> <app-name>
  4. # Alternative way.
  5. npm install -g preact-cli
  6. preact create typescript my-project
Programming Language: Bash