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

Multiple nested slot reference errors? #2969

Closed
7 tasks
nibushibu opened this issue Oct 10, 2022 · 6 comments
Closed
7 tasks

Multiple nested slot reference errors? #2969

nibushibu opened this issue Oct 10, 2022 · 6 comments

Comments

@nibushibu
Copy link
Member

Help us to manage our issues by answering the following:

  1. Describe your issue:

In some cases, items of "each" cannot be delivered to a slot that is nested multiple times.

  1. Can you reproduce the issue?

Since the Runtime version of Riot.js did not reproduce the problem,
I have uploaded the complete set of data I reproduced on my end to the following branch.

https://github.com/nibushibu/Getup/tree/check-riot-7-slot-issue

npm install
npm run start

After doing the above, please check http://localhost:3000

The value passed to slot cannot be referenced and an error occurs.
Screen Shot 0004-10-10 at 12 30 31

On the other hand, this error does not occur when Riot.js is downgraded to v6.
Screen Shot 0004-10-10 at 12 32 37

  1. On which browser/OS does the issue appear?

macOS Version 12.6 (Build 21G115)
Vivaldi 5.5.2805.35 (Stable channel) (arm64)

  1. Which version of Riot does it affect?
    "riot": "^7.0.6",
    "@riotjs/cli": "^6.1.0",
    "@riotjs/compiler": "^6.3.2",
  1. How would you tag this issue?
  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
@GianlucaGuarini
Copy link
Member

GianlucaGuarini commented Nov 1, 2022

It seems that esbuild is messing up with the project dependencies loading the shared ones twice.

Screenshot 2022-11-01 at 22 55 56

@riotjs/util gets loaded two times and that causes the issue.
Do you know if there is an esbuild option to avoid this side effect?

@nibushibu
Copy link
Member Author

@GianlucaGuarini
Thank you for verifying the issue.
Am I correct in assuming that the problem is caused by esbuild?
I wish I’ll try to another bundler for now🧐
anyway, I greatly appreciate your help.🤘

@nibushibu
Copy link
Member Author

I found an issue in esbuild that I think is related to this problem.

evanw/esbuild#1038 (comment)

Perhaps a solution to this problem would be to do the following

yarn dedupe @riotjs/util

However, I am using npm instead of yarn.
I will continue to look for a solution to this problem.

@nibushibu
Copy link
Member Author

nibushibu commented Nov 2, 2022

Oops, I see that npm also has a command dedupe.

https://docs.npmjs.com/cli/v9/commands/npm-dedupe

In any case, the following method has eliminated the error in my environment!🤔

npm install -D @riotjs/util
npm dedupe

https://github.com/nibushibu/Getup/tree/check-riot-7-slot-issue

@GianlucaGuarini
Copy link
Member

Alright I will work on a patch to solve it easily

@GianlucaGuarini
Copy link
Member

It should be fixed in v7.1.0

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

No branches or pull requests

2 participants