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

Fix: Output folder issue fix #7

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

hyqshr
Copy link

@hyqshr hyqshr commented Apr 25, 2024

In this PR:

1. Add Run Locally section to README

New Run Locally section provides step-by-step instructions for setting up and running the extension on local machines.

2. Resolve Output Folder Bug

Issue

After setting up using the Run Locally instructions, the webview will keep loading indefinitely. Additionally, VSCode will output the following error:

Activating extension 'Greptile.greptile-vscode' failed: Cannot find module '/Users/huang/project/greptile-vscode/dist/extension.js' Require stack: - /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js - /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-amd.js - /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork.js
image

I noticed that in tsconfig.json:

...
    "outDir": "out",
...

while in package.json:

...
  "main": "./dist/extension.js",
...

This is the source of the bug.

Solution

I resolved the issue by updating package.json:

...
  "main": "./out/extension.js",
...

This adjustment ensures consistency between the specified output directory in the tsconfig.json file and the main entry point defined in the package.json. This is crucial for the extension to load correctly without errors in VSCode.

@hyqshr hyqshr changed the title README: Add Run Locally to README Fix: Output folder issue fix Apr 25, 2024
Copy link

@0verread 0verread left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for this changes. 😃

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

Successfully merging this pull request may close these issues.

2 participants