HaaLeo / publish-vscode-extension

GitHub action to publish your VS Code Extension to the Open VSX Registry or Visual Studio Marketplace.
MIT License
206 stars 13 forks source link

Raising Error TS5083: Cannot read file when submodule is contained within #55

Closed DavidBuzatu-Marian closed 3 months ago

DavidBuzatu-Marian commented 3 months ago
publish-vscode-extension Version Operating System
1.6.2 ubuntu-latest

Description

Action fails on step Publish to Visual Studio Marketplace when running prepublish scripts, resulting in the error: error TS5083: Cannot read file '/home/runner/work/Jsoniq-VSCode-Extension/Jsoniq-VSCode-Extension/server_language/tsconfig.json'. It seems suspicious to me that this fails as running the same command locally on MacOS Sonoma 14.5 (npm run vscode:prepublish) does not provide such error. Moreover, running the action through act succeeds with publishing the extension.

Expected Behavior

The extension should publish the VS Code extension.

Actual Behavior

It results in the following error:

Error: npm failed with exit code 2

Steps to Reproduce

An instance of such a failure can be found here. To reproduce, re-run the action.

Context



Run HaaLeo/publish-vscode-extension@v1
Specifically, running GitHub Action HaaLeo/publish-vscode-extension@v1.6.2.
Package the Extension
  Start packaging the extension.
  Executing prepublish script 'npm run vscode:prepublish'...

  > jsoniq@1.1.8 vscode:prepublish
  > npm run compile

  > jsoniq@1.1.8 compile
  > tsc -b

  error TS5083: Cannot read file '/home/runner/work/Jsoniq-VSCode-Extension/Jsoniq-VSCode-Extension/server_language/tsconfig.json'.
```            
HaaLeo commented 3 months ago

Hi @DavidBuzatu-Marian, thx for raising this issue. To me this looks like that the action is executed in the wrong directory? Maybe that has something to do with checking out git submodules. Maybe you want to double check the CWD before the action is started (both locally as well as remotely). You can also try to configure the packagePath option of the action to get it working for your use case. Hope that helps.

DavidBuzatu-Marian commented 3 months ago

Hi @HaaLeo! Thank you for your prompt reply! You are right, there was something off with submodules. Apologies for this issue and thank you once more for the support!