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 ERR_INVALID_URL_SCHEME Error #119

Merged
merged 8 commits into from
Nov 7, 2024
Merged

Fix ERR_INVALID_URL_SCHEME Error #119

merged 8 commits into from
Nov 7, 2024

Conversation

ncalteen
Copy link
Collaborator

@ncalteen ncalteen commented Nov 7, 2024

local-action was consistently failing with an error similar to the following:

TypeError [ERR_INVALID_URL_SCHEME]: The URL must be of scheme file
    at fileURLToPath (node:internal/url:1499:11)
    at finalizeResolution (node:internal/modules/esm/resolve:258:42)
    at moduleResolve (node:internal/modules/esm/resolve:914:10)
    at defaultResolve (node:internal/modules/esm/resolve:1038:11)
    at nextResolve (node:internal/modules/esm/hooks:748:28)
    ... {
  code: 'ERR_INVALID_URL_SCHEME'

This was occurring when quibble was attempting to stub out @actions/core. Removing the allowJs setting in tsconfig.base.json resolves this error.

Additionally, the bin/local-action.js script that generates the TSX command that is run was causing a similar error when trying to find the node_modules path for the called action. This has been resolved with a more OS-independent lookup.

@ncalteen ncalteen requested a review from Copilot November 7, 2024 19:44
@ncalteen ncalteen self-assigned this Nov 7, 2024

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again, by re-requesting a review.

@ncalteen ncalteen requested a review from Copilot November 7, 2024 19:45
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 suggestion.

Files not reviewed (2)
  • package.json: Language not supported
  • tsconfig.base.json: Language not supported

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

src/commands/run.ts Outdated Show resolved Hide resolved
@ncalteen ncalteen requested a review from Copilot November 7, 2024 19:49

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 6 changed files in this pull request and generated no suggestions.

Files not reviewed (3)
  • package.json: Language not supported
  • tsconfig.base.json: Language not supported
  • tsconfig.eslint.json: Language not supported
Comments skipped due to low confidence (1)

src/commands/run.ts:120

  • The error message should be 'Could not find the node_modules directory'.
throw new Error('Could not find node_modules directory')

Tip: Turn on automatic Copilot reviews for this repository to get quick feedback on every pull request. Learn more

@ncalteen ncalteen merged commit 913f94f into main Nov 7, 2024
10 checks passed
@ncalteen ncalteen deleted the ncalteen/url branch November 7, 2024 19:51
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.

1 participant