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

[Bug?]: Issue with context who don't return the value #1185

Closed
2 tasks done
qlaffont opened this issue Dec 27, 2023 · 8 comments
Closed
2 tasks done

[Bug?]: Issue with context who don't return the value #1185

qlaffont opened this issue Dec 27, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@qlaffont
Copy link

qlaffont commented Dec 27, 2023

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

Hello I have a very strange bug with the new solid-start template :

  • I have a library who is package with tsup and tsup-preset-solid : https://github.com/qlaffont/rosetty-solid
  • When I try to import my provider to access to my context and call it in my app sometimes I can access to the context value and sometimes I got undefined
  • If i rebuild with tsup -> It will work 1 time and the other time is breaking but no changes have been made on the code

It's very frustrating... Can someone can help me, it is very strange and it is blocking me to make the migration to new solid start for my company.

The issue is not an HMR issue because when I stop the server and restart it, the issue persist.

Expected behavior 🤔

Context should return value

Steps to reproduce 🕹

No response

Context 🔦

YouTube Video about the issue : https://youtu.be/fydxXDyOrCE
More details here : https://discord.com/channels/722131463138705510/1189503397091606548

Your environment 🌎

No response

@qlaffont qlaffont added the bug Something isn't working label Dec 27, 2023
@qlaffont
Copy link
Author

Library Code :
image

app.tsx :
image

home.tsx :
image

@ryansolid
Copy link
Member

This was a bug in rosetty-solid 1.0.74. It appears they were bundling a duplicate version of solid. version 1.0.75 seems to have corrected that.

@qlaffont
Copy link
Author

qlaffont commented Jan 9, 2024

@ryansolid yes I'm agree with you but I don't understand why I have the error "Uncaught SyntaxError: ambiguous indirect export: default".

I have package the rosetty-solid with tsup and tsup solid as recommanded...
Can you help me to understand ?

You can found the repro here : https://github.com/qlaffont/test-cmp

@qlaffont
Copy link
Author

@ryansolid ?

@qlaffont
Copy link
Author

@ryansolid 1 month I have the issue without a solution ... I'm desperate .... Are you interested in a bounty to solve this bug ? 50 $ ?

@qlaffont
Copy link
Author

as discuss on discord with @lxsmnsyc the repro https://github.com/qlaffont/test-cmp reproduce the issue :
image

@qlaffont
Copy link
Author

Issue fix for context issue with tsup : egoist/tsup#998

solid and other library was included in project

@qlaffont
Copy link
Author

Finally we found the issue, it comes with dayjs. I have switch to date-fns and it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants