Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typechain errors when a directory in the imported path contains an integer as first character #794

Open
dievardump opened this issue Nov 18, 2022 · 0 comments · May be fixed by #795
Open

Comments

@dievardump
Copy link

dievardump commented Nov 18, 2022

TypeChain auto generated files are transforming paths into modules.

However, if a directory in the path starts with an Integer, this creates a module name starting with an integer, which is not valid in node and breaks TypeChain

Examples

importing package from node_modules

import {SignedAllowance} from "@0xdievardump/signed-allowances/contracts/SignedAllowance.sol";
SyntaxError: Identifier expected. (4:18)
  2 | /* tslint:disable */
  3 | /* eslint-disable */
> 4 | import type * as 0Xdievardump from './@0xdievardump';
    |                  ^

importing local file

import {$721Renderer} from "./721Renderers/$721Renderer.sol";
SyntaxError: An identifier or keyword cannot immediately follow a numeric literal. (4:21)
  2 | /* tslint:disable */
  3 | /* eslint-disable */
> 4 | import type * as 721Renderers from './721Renderers';
    |                  ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant