yargs / yargs-parser

:muscle: the mighty option parser used by yargs
http://yargs.js.org/
ISC License
493 stars 119 forks source link

Broken build on fresh clone (developer) #470

Open shadowspawn opened 1 year ago

shadowspawn commented 1 year ago

After a fresh clone the npm run script build:cjs is failing.

Related context: node v18.14.2 on an Apple Silicon Mac

$ npm run build:cjs

> yargs-parser@21.1.1 build:cjs
> rollup -c

./lib/index.ts → ./build/index.cjs...
DeprecationWarning: 'createExportAssignment' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
(!) Unresolved dependencies
https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency
util (imported by lib/index.ts)
path (imported by lib/index.ts)
fs (imported by lib/index.ts)
[!] (plugin Typescript) Error: Debug Failure. Unhandled SyntaxKind: Unknown.
Error: Debug Failure. Unhandled SyntaxKind: Unknown.
    at pipelineEmitWithHintWorker (/Users/john/Documents/Sandpits/yargs/yargs-parser/my-fork/node_modules/typescript/lib/typescript.js:114185:22)
    at pipelineEmitWithHint (/Users/john/Documents/Sandpits/yargs/yargs-parser/my-fork/node_modules/typescript/lib/typescript.js:113716:17)
    at pipelineEmitWithComments (/Users/john/Documents/Sandpits/yargs/yargs-parser/my-fork/node_modules/typescript/lib/typescript.js:117404:13)
    at pipelineEmit (/Users/john/Documents/Sandpits/yargs/yargs-parser/my-fork/node_modules/typescript/lib/typescript.js:113656:13)
    at emitExpression (/Users/john/Documents/Sandpits/yargs/yargs-parser/my-fork/node_modules/typescript/lib/typescript.js:113640:13)
    at emitExportAssignment (/Users/john/Documents/Sandpits/yargs/yargs-parser/my-fork/node_modules/typescript/lib/typescript.js:115652:13)
    at pipelineEmitWithHintWorker (/Users/john/Documents/Sandpits/yargs/yargs-parser/my-fork/node_modules/typescript/lib/typescript.js:113929:32)
    at pipelineEmitWithHint (/Users/john/Documents/Sandpits/yargs/yargs-parser/my-fork/node_modules/typescript/lib/typescript.js:113716:17)
    at pipelineEmitWithComments (/Users/john/Documents/Sandpits/yargs/yargs-parser/my-fork/node_modules/typescript/lib/typescript.js:117404:13)
    at pipelineEmit (/Users/john/Documents/Sandpits/yargs/yargs-parser/my-fork/node_modules/typescript/lib/typescript.js:113656:13)
Jermim commented 1 year ago

seems working by updating typescript version in package.json "typescript": "4.6.4"