primereact
primereact copied to clipboard
Contributing: Unable to develop locally using instructions from `DEVELOPMENT.md`
Describe the bug
I followed all instructions from DEVELOPMENT.md
but when I'm using the local library in my test project I get module-not-found
errors:
Reproducer
https://github.com/primefaces/primereact/blob/master/DEVELOPMENT.md
PrimeReact version
10.5.0
React version
18.x
Language
TypeScript
Build / Runtime
Next.js
Browser(s)
all
Steps to reproduce the behavior
Follow all steps from DEVELOPMENT.md
Expected behavior
Test app is able to work with local version of primereact when using npm link
and npm run dev:link
Same as https://github.com/primefaces/primereact/issues/5648#issuecomment-1873025061
@zawasp what OS are you using Linux or Windows?
@bweis any thoughts here you wrote the original instructions I wonder if something has changed and needs to be updated?
It's Ubuntu under WSL2 and node 20
For anyone trying to contribute, I found a workaround:
- in a new nextjs app (could be react as well), I symlinked the
components/lib
folder from the primereact repo intoapp
. Something like this (ran from theapp
folder in my nextjs app):ln -s /home/user/primereact/components/lib primereact
You need to adjust your imports a bit, e.g.:
import { Button } from "./primereact/button/Button";
instead of import { Button } from "./primereact/button";
Note this is not ideal, but at least I can contribute.
That is fantastic actually.
@zawasp i wonder if you should add this to the MD file?