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 module issue in CI #11

Merged
merged 2 commits into from
Oct 21, 2024
Merged

Fix module issue in CI #11

merged 2 commits into from
Oct 21, 2024

Conversation

tsmock
Copy link
Collaborator

@tsmock tsmock commented Oct 21, 2024

(node:1808) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/home/runner/work/tag2link/tag2link/build.ts:2
import { isDeepStrictEqual } from "util";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (node:internal/modules/cjs/loader:1378:20)
    at Module._compile (node:internal/modules/cjs/loader:1428:41)
    at Module.m._compile (/home/runner/work/tag2link/tag2link/node_modules/ts-node/src/index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Object.require.extensions.<computed> [as .ts] (/home/runner/work/tag2link/tag2link/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1104:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
    at phase4 (/home/runner/work/tag2link/tag2link/node_modules/ts-node/src/bin.ts:649:14)
    at bootstrap (/home/runner/work/tag2link/tag2link/node_modules/ts-node/src/bin.ts:95:10)

The fix is to use nodenext for moduleResolution.

Signed-off-by: Taylor Smock <tsmock@meta.com>
Signed-off-by: Taylor Smock <tsmock@meta.com>
@tsmock tsmock merged commit 2ace544 into master Oct 21, 2024
2 checks passed
@tsmock tsmock deleted the fix-ci branch October 21, 2024 16:20
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