Closed rockyhwang closed 1 year ago
Thanks @rockyhwang, not sure what you are trying to do, but have you tried running just npm run build
?
Thanks @rockyhwang, not sure what you are trying to do, but have you tried running just
npm run build
?
Hi Henry, I think the issues are related es version as I illustrated as follows. Even I add in some values to upgrade the configuration in tsconfig.json above ES5 version. It does not work to resolve these compile errors. Anyway, thanks for your comments.
Rocky
"target": "es2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": ["es2020",
"dom",
"es2015.core",
"es2015.collection",
"es2015.generator",
"es2015.iterable",
"es2015.promise",
"es2015.proxy",
"es2015.reflect",
"es2015.symbol",
"es2015.symbol.wellknown",
"esnext.asynciterable"],
@rockyhwang, following up, have you tried directly running
npm i
followed by
npm run build
Closing
Hi I got following errors after run tsc index.ts command. I modify the "target" and "lib" attribute value in tsconfig.json to the newer es version. But, it does not work at all. Please advise what should I do further to conquer the problems. Thanks a lot!
bitcoin/BitcoinProcessor.ts:321:24 - error TS2569: Type 'IterableIterator' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators.
321 for (const hash of hashes) {
bitcoin/RequestError.ts:18:14 - error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
18 public get expose (): boolean {
core/DownloadManager.ts:74:52 - error TS2569: Type 'Map<Buffer, DownloadInfo>' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators.
74 for (const [downloadHandle, downloadInfo] of this.activeDownloads) {
Found 6 errors.