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/10445338966682583277 Replies
@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-templateCreate a New Extension – Plasmo
How to get started using the Plasmo Framework to build your browser extension.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
@tyn1998 has reached level 2. GG!
@Scotty
what does with-nextjs do here? Also, do I need to use pnpm?
Gave +1 Rep to @Scotty
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 youWhy do I run the with-antd project in examples-main, popup.tsx has an antd button, but content.tsx doesn't?、