Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

typescript diagonostic codes not properly thrown during capi sync #1180

Open
ryanleecode opened this issue Jul 14, 2023 · 1 comment · May be fixed by #1198
Open

typescript diagonostic codes not properly thrown during capi sync #1180

ryanleecode opened this issue Jul 14, 2023 · 1 comment · May be fixed by #1198
Assignees
Labels
bug Something is broken cli queued

Comments

@ryanleecode
Copy link
Contributor

ryanleecode commented Jul 14, 2023

I was running capi sync in a react-native project and it failed with

➜  capi-react-native-example git:(feat/rollup) ✗ npm run sync

> [email protected] sync
> capi sync node

(node:17091) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
file:///home/ryan/Documents/Repositories/capi-vite-example/capi-react-native-example/node_modules/capi/esm/deps_2/deno.land/x/[email protected]/command/command.js:908
                : new Error(`[non-error-thrown] ${error}`));
                  ^

Error: [non-error-thrown] [object Object]
    at Command.handleError (file:///home/ryan/Documents/Repositories/capi-vite-example/capi-react-native-example/node_modules/capi/esm/deps_2/deno.land/x/[email protected]/command/command.js:908:19)
    at Command.parseCommand (file:///home/ryan/Documents/Repositories/capi-vite-example/capi-react-native-example/node_modules/capi/esm/deps_2/deno.land/x/[email protected]/command/command.js:595:18)

Node.js v20.3.1

throwing a non-error. editing the transpiled javascript to print out what the actual error was produced:

{ diagnosticCodes: [ 2307 ] }

Which seems to be TS2307 - cannot find module for local file.


Could be a cliffy issue and not a capi issue since theres no stacktrace relating to capi, only cliffy.

@robocapi robocapi added this to Capi Jul 14, 2023
@vjjft vjjft added the bug Something is broken label Jul 14, 2023
@ryanleecode ryanleecode self-assigned this Jul 17, 2023
@ryanleecode
Copy link
Contributor Author

Adding this to tsconfig fixes it

  "module": "ESNext",
  "moduleResolution": "node16"

@ryanleecode ryanleecode linked a pull request Jul 17, 2023 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something is broken cli queued
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants