Skip to content

Commit

Permalink
Fix ERR_INVALID_URL_SCHEME Error (#119)
Browse files Browse the repository at this point in the history
`local-action` was consistently failing with an error similar to the
following:

```plain
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.
  • Loading branch information
ncalteen authored Nov 7, 2024
1 parent 6a03eea commit 913f94f
Show file tree
Hide file tree
Showing 6 changed files with 767 additions and 556 deletions.
Loading

0 comments on commit 913f94f

Please sign in to comment.