Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: error when using locally linked version of waku #676

Open
pmelab opened this issue Apr 27, 2024 · 7 comments
Open

dev: error when using locally linked version of waku #676

pmelab opened this issue Apr 27, 2024 · 7 comments

Comments

@pmelab
Copy link
Contributor

pmelab commented Apr 27, 2024

I'm trying to link a local version of Waku into our own project code to quickly iterate on PR's and test them in a real use case, but I keep getting the follow error:

TypeError: Cannot read properties of null (reading 'use')
    at react_production_min.use ([...]/waku-test/dist/ssr/assets/rsc0-b97afaf68.js:324:22)
    at Slot ([...]/waku-test/dist/ssr/assets/rsc0-b97afaf68.js:10168:40)

Can be reproduced by:

git clone git@github.com:dai-shi/waku.git
cd waku
pnpm install
pnpm compile
cd ..
pnpm create waku # choose name 'waku-test'
cd waku-test
pnpm remove waku
pnpm add ../waku/packages/waku
pnpm build

Did anybody encounter this or have an idea what could cause it?

@dai-shi
Copy link
Owner

dai-shi commented Apr 27, 2024

How about pnpm link?

@pmelab
Copy link
Contributor Author

pmelab commented Apr 27, 2024

🙈 I completely forgot that pnpm link exists. Thank you for jogging my mind!

But it yields the same result.

@dai-shi
Copy link
Owner

dai-shi commented Apr 27, 2024

Yeah, now I remember that I probably tried it before. (I wonder if @himself65 has any idea.)

It probably fails with similar issue like #429.
We want to fix it and your investigation is welcome.

For the moment, the way it works is to use npm (or maybe yarn) and replace node_modules/waku/dist. You need to copy the files because symbolic link doesn't work.

@pmelab
Copy link
Contributor Author

pmelab commented Apr 27, 2024

I have to integrate it into a monorepo setup as well. I will keep an eye open and report back.

@JesseKoldewijn
Copy link
Contributor

Did ya try to use workspaces instead of links? (ie. pnpm workspaces)

@himself65
Copy link
Contributor

I think this is because there are two different versions of React; could you please confirm that?

@himself65
Copy link
Contributor

Just double checked and yes it is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants