vacuumlabs / ledgerjs-cardano-shelley

update of Ledger Nano javascript code to Cardano Shelley
Apache License 2.0
9 stars 2 forks source link

it breaks for typescript 4.7, or perhaps even 4.5, with some odd error #165

Closed janmazak closed 1 year ago

janmazak commented 2 years ago

yarn run v1.22.19 warning ../../package.json: No license field $ yarn mocha --timeout 3600000 -r ts-node/register test/integration/*/.test.ts --dry-run warning ../../package.json: No license field $ /home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/.bin/mocha --timeout 3600000 -r ts-node/register 'test/integration/*/.test.ts' --dry-run

Error: Debug Failure. False expression: Non-string value passed to ts.resolveTypeReferenceDirective, likely by a wrapping package working with an outdated resolveTypeReferenceDirectives signature. This is probably not a problem in TS itself. at Object.resolveTypeReferenceDirective (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:42536:18) at /home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/ts-node/src/index.ts:623:55 at Array.map () at Object.resolveTypeReferenceDirectives (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/ts-node/src/index.ts:622:33) at actualResolveTypeReferenceDirectiveNamesWorker (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:116673:163) at resolveTypeReferenceDirectiveNamesWorker (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:116973:26) at processTypeReferenceDirectives (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:118455:31) at findSourceFileWorker (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:118340:21) at findSourceFile (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:118195:26) at processImportedModules (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:118601:25) at findSourceFileWorker (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:118346:17) at findSourceFile (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:118195:26) at /home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:118147:85 at getSourceFileFromReferenceWorker (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:118113:34) at processSourceFile (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:118147:13) at processRootFile (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:117948:13) at /home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:116764:67 at Object.forEach (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:377:30) at Object.createProgram (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:116764:16) at synchronizeHostData (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:165063:26) at Object.getProgram (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/typescript/lib/typescript.js:165195:13) at getOutput (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/ts-node/src/index.ts:731:39) at Object.compile (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/ts-node/src/index.ts:968:32) at Module.m._compile (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/ts-node/src/index.ts:1056:42) at Module._extensions..js (internal/modules/cjs/loader.js:1205:10) at Object.require.extensions. [as .ts] (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/ts-node/src/index.ts:1059:12) at Module.load (internal/modules/cjs/loader.js:1034:32) at Function.Module._load (internal/modules/cjs/loader.js:923:14) at Module.require (internal/modules/cjs/loader.js:1074:19) at require (internal/modules/cjs/helpers.js:72:18) at Object.exports.requireOrImport (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/mocha/lib/nodejs/esm-utils.js:60:20) at Object.exports.loadFilesAsync (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/mocha/lib/nodejs/esm-utils.js:103:20) at singleRun (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/mocha/lib/cli/run-helpers.js:125:3) at Object.exports.handler (/home/george/Projects/iohk/ledgerjs-cardano-shelley/node_modules/mocha/lib/cli/run.js:374:5) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 1.

janmazak commented 2 years ago

Update: the error is probably only caused by a human error (mixing npm and yarn), but anyway, we should check if updating typescript version works.