How to run and test an example

Hi guys, I'm learning Plasmo and at the moment I want to run examples in PlasmoHQ/examples. However, after cloning the project and cd into a certain example dir then run pnpm i I get this error. Is it because I missed some important steps? ref: https://discord.com/channels/946290204443025438/946290204904390690/1044533896668258327
7 Replies
lab
lab2y ago
@tyn1998 To try the examples directly from the example repo, you will need to clone the framework itself following the contribution guide (note the recursive submodule flag): https://github.com/PlasmoHQ/plasmo/blob/main/.github/CONTRIBUTING.md - The reason being it is consuming the development/workspace version of plasmo (we use these examples as our E2E test for each release) The cli offers a --with flag to quickly test out a specific example as well, so if you would like a quicker way, please follow this guide: https://docs.plasmo.com/workflows#with-an-example-template
Create a New Extension – Plasmo
How to get started using the Plasmo Framework to build your browser extension.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Arcane
Arcane2y ago
@tyn1998 has reached level 2. GG!
lab
lab2y ago
@Scotty
what does with-nextjs do here? Also, do I need to use pnpm?
YAGPDB.xyz
YAGPDB.xyz2y ago
Gave +1 Rep to @Scotty
lab
lab2y ago
You don't need to use pnpm, the docs show example of using yarn or npm as well. Note that with npm or yarn, you need the extra -- --with-etc And the --with-* is a feature of the plasmo CLI to fetch the dedicated example and prep the dependencies for you
Justin
Justin6mo ago
Why do I run the with-antd project in examples-main, popup.tsx has an antd button, but content.tsx doesn't?、
Want results from more Discord servers?
Add your server