-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Dependencies cache issue on the server #2284
Comments
Hey @oliviertassinari , I think this #2075 (comment) should maybe address your issue? |
Ok, I think that we can try |
Nice! Closing this for now, please reopen if you encounter further issues. Also, for more general questions, you can open a thread on Spectrum. |
We went for not applying this patch. The example is optimized for people starting a new project. They copy and paste the source, we shouldn't mix the concerns. |
Is there a way to solve this problem without leaking the concern outside codesandbox? |
We're always open to suggestions. 🙂 |
I was wondering, maybe we could use an env variable to conditionally apply the command? "scripts": {
"dev": "next",
"build": "next build",
- "start": "next start"
+ "start": "next start",
+ "post-update": "[[ -n $CODESANDBOX ]] && yarn upgrade --latest"
}
} But then, what about Windows 🙃 cc @garethx |
But |
@lbogdan I didn't know that. I thought it was a npm command I wasn't aware of. I think that if it were prefixed with |
Yeah, we modeled it after |
@garethx what do you think about reopening the pull request, for all our demos with this approach? "scripts": {
"dev": "next",
"build": "next build",
- "start": "next start"
+ "start": "next start",
+ "post-update": "echo \"codesandbox preview only, need an update\" && yarn upgrade --latest"
}
} @lbogdan Thanks for the help. |
🐛 bug report
Description of the problem
I believe there is a caching issue with the server-side containers. Running the following url https://codesandbox.io/s/github/mui-org/material-ui/tree/master/examples/nextjs should start a project with the latest version of the dependencies. It seems that it's not the case for Material-UI. From what I can observe, it pulls our v3 instead of v4.
How has this issue affected you?
The problem was reported by one of our users in mui/material-ui#16979.
Link to sandbox
The text was updated successfully, but these errors were encountered: