Skip to content
This repository was archived by the owner on Aug 27, 2026. It is now read-only.

Fix: Output folder issue fix - #7

Open
hyqshr wants to merge 3 commits into
greptileai:mainfrom
hyqshr:main
Open

Fix: Output folder issue fix#7
hyqshr wants to merge 3 commits into
greptileai:mainfrom
hyqshr:main

Conversation

@hyqshr

@hyqshr hyqshr commented Apr 25, 2024

Copy link
Copy Markdown

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

@0verread 0verread left a comment

Copy link
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants