question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

incompatible with latest Typescript compiler

See original GitHub issue

Having recently upgraded my project to Typescript 3.7.0-beta the project refuses to build throwing the following error: node_modules/ethers/utils/bytes.d.ts:5:10 - error TS2440: Import declaration conflicts with local declaration of 'Arrayish'.

The error is thrown on the following line of code in utils/bytes.d.ts:

import { Arrayish } from './bytes';
export declare type Arrayish = string | ArrayLike<number>;

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ricmoocommented, Oct 17, 2019

This has been published to NPM and a release has been cut.

Please try out 4.0.38 and let me know if you still have any problems. 😃

1reaction
FSM1commented, Oct 7, 2019

No, I think that it may be a change in how the compiler handles things.

I tried pulling the current ethers.js repo down and upgrading the TS version to 3.7.0-beta and receive the same error.

///////////////////////////////
// Imported Types

import { Arrayish } from './bytes';

///////////////////////////////
// Exported Types

export type Arrayish = string | ArrayLike<number>;

The import {} references itself, and then the type is re-declared in the export. Removing the import statement from utils/bytes.ts resolves the issue.

Tests are all passing.

@ricmoo can I author a merge request?

Read more comments on GitHub >

github_iconTop Results From Across the Web

typescript - Incompatible Identical Types - Stack Overflow
It's just that the module exists in two places. It exists at the top-level of node_modules , and also exists as a dependency...
Read more >
Documentation - TypeScript 3.9
TypeScript 3.9 ships with many new speed improvements. Our team has been focusing on performance after observing extremely poor editing/compilation speed ...
Read more >
TypeScript errors and how to fix them
A list of common TypeScript errors and how to fix them.
Read more >
ts-loader - npm
Latest version: 9.4.2, last published: 25 days ago. ... The build should fail on TypeScript compilation errors as of webpack 2.
Read more >
TypeScript - Cypress Documentation
The "types" will tell the TypeScript compiler to only include type ... Since Chai and jQuery are namespaces (globals), incompatible versions will cause...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found