Skip to content

Not able to create new files from terminal #419

@shhdharmen

Description

@shhdharmen

Describe the bug

Even after keeping allowRedirects: true (under terminals > panels) and watch: true (under filesystem), we are not able to create new files from terminal. Example: echo hello > world.txt. Observe that file is created in webcontainer fs, but not getting reflected in editor's file-tree.

Link to a StackBlitz project which shows the error

https://stackblitz.com/edit/tutorialkit-api-use-helpbutton-yfxyqb?file=src%2Fcontent%2Ftutorial%2F1-basics%2F1-introduction%2F1-welcome%2Fcontent.mdx

Steps to reproduce

  1. Go to https://stackblitz.com/edit/tutorialkit-api-use-helpbutton-yfxyqb?file=src%2Fcontent%2Ftutorial%2F1-basics%2F1-introduction%2F1-welcome%2Fcontent.mdx
  2. Click on "Toggle Terminal"
  3. Go to interactive "Terminal"
  4. Write command to create file, example echo hello > world.txt
  5. Observe that file is created in webcontainer's fs using ls
  6. Observe that file is not reflected in editor's file-tree

Expected behavior

If we keep allowRedirects: true, it should show newly created file in editor's file-tree

For example, if we write echo hello > world.txt in interactive terminal, it should create file named "world.txt" in editor's file-tree.

Screenshots

Screen.Recording.2024-11-16.144557.mp4

Platform

  • TutorialKit version: 1.3.0
  • OS: Window
  • Browser: Edge
  • Version: 130.0.2849.80

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion related to TutorialKit that doesn't require changes in codebase.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions