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

[docs-infra] Unable to download codesandbox #38860

Closed
2 tasks done
Janpot opened this issue Sep 7, 2023 · 7 comments · Fixed by #39317
Closed
2 tasks done

[docs-infra] Unable to download codesandbox #38860

Janpot opened this issue Sep 7, 2023 · 7 comments · Fixed by #39317
Assignees
Labels
good first issue Great for first contributions. Enable to learn the contribution process. package: icons Specific to @mui/icons scope: docs-infra Specific to the docs-infra product

Comments

@Janpot
Copy link
Member

Janpot commented Sep 7, 2023

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

Link to live example:

Steps:

  1. Go to an example

  2. Follow codesandbox button

  3. In Files, click "export to ZIP"

    Screenshot 2023-09-07 at 15 45 17

  4. Unpack the archive

  5. navigate to the folder and run yarn && yarn start

Current behavior 😯

Screenshot 2023-09-07 at 15 47 19

Failed to compile.

Module not found: Error: Can't resolve './Demo' in '/Users/janpotoms/Desktop/k5gwnp/src'
ERROR in ./src/index.tsx 7:0-26
Module not found: Error: Can't resolve './Demo' in '/Users/janpotoms/Desktop/k5gwnp/src'

webpack compiled with 1 error

Expected behavior 🤔

  1. Run mv src/tsconfig.json tsconfig.json
  2. Run again yarn start

Now it works

Context 🔦

Your environment 🌎

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
@Janpot Janpot added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 7, 2023
@zannager zannager added the package: icons Specific to @mui/icons label Sep 7, 2023
@Janpot
Copy link
Member Author

Janpot commented Sep 7, 2023

I noticed the default create-react-app template that ours is based on uses a src folder to contain the application. I suspect that it could start working if we change

[`index.${ext}`]: {
content: CRA.getRootIndex(demoData),
},
[`Demo.${ext}`]: {
content: demoData.raw,
},

to

    [`src/index.${ext}`]: {
      content: CRA.getRootIndex(demoData),
    },
    [`src/Demo.${ext}`]: {
      content: demoData.raw,
    },

@siriwatknp siriwatknp added docs Improvements or additions to the documentation good first issue Great for first contributions. Enable to learn the contribution process. and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 25, 2023
@Karthikeya-Meesala
Copy link

Hey @siriwatknp,

I'm interested in working on this issue. Could you please assign it to me? I'd appreciate some guidance on how to get started and the best approach to tackle this.

Thanks!

@siriwatknp
Copy link
Member

Hey @siriwatknp,

I'm interested in working on this issue. Could you please assign it to me? I'd appreciate some guidance on how to get started and the best approach to tackle this.

Thanks!

Assigned, thanks for asking!

@Karthikeya-Meesala
Copy link

Hi @siriwatknp, Thank you for assigning the issue to me. I've taken a closer look at the problem and the suggestions provided by Janpot. I'm considering starting with the file structure adjustment as proposed. Before I proceed, I'd appreciate any insights or suggestions you might have on this approach or if there are other considerations I should be aware of.

@Aditya-Sakpal
Copy link

Is this issue open ? Should I start working on it??

@siriwatknp
Copy link
Member

Hi @siriwatknp, Thank you for assigning the issue to me. I've taken a closer look at the problem and the suggestions provided by Janpot. I'm considering starting with the file structure adjustment as proposed. Before I proceed, I'd appreciate any insights or suggestions you might have on this approach or if there are other considerations I should be aware of.

I think you can try the suggestion from @Janpot and see if it solve the problem.

@ARJ2160
Copy link
Contributor

ARJ2160 commented Oct 5, 2023

Hi, I have just started contributing to open source. If there are any changes you'd like to make to the PR please free to!
PS - Thank you @Janpot, the suggestion was tremendously helpful!

@danilo-leal danilo-leal added scope: docs-infra Specific to the docs-infra product and removed docs Improvements or additions to the documentation labels Oct 5, 2023
@danilo-leal danilo-leal changed the title Unable to download codesandbox [docs-infra] Unable to download codesandbox Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Great for first contributions. Enable to learn the contribution process. package: icons Specific to @mui/icons scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants