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

TypeError: Cannot read properties of undefined (reading '1') in solc.js when passing the input for --standard-json via stdin #601

Open
sava-1729 opened this issue Feb 12, 2022 · 1 comment

Comments

@sava-1729
Copy link

I tried running
solcjs --standard-json

and the following output was produced:

node:fs:208
let mode = stats[1];
^
TypeError: Cannot read properties of undefined (reading '1')
←[90m at isFileType (node:fs:208:19)←[39m
←[90m at Object.readFileSync (node:fs:456:16)←[39m
at Object. (C:\Users\sriva\AppData\Roaming\npm\node_modules\←[4msolc←[24m\solcjs:128:18)
←[90m at Module._compile (node:internal/modules/cjs/loader:1101:14)←[39m
←[90m at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)←[39m
←[90m at Module.load (node:internal/modules/cjs/loader:981:32)←[39m
←[90m at Function.Module._load (node:internal/modules/cjs/loader:822:12)←[39m
←[90m at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)←[39m
←[90m at node:internal/main/run_main_module:17:47←[39m

The "^" isn't correctly placed in the above text; it was just below "[" in "let mode = stats[1];"

What's wrong here? solcjs --abi and solcjs --bin work perfectly well.

@cameel
Copy link
Member

cameel commented May 28, 2022

Thanks for reporting. This seems to be a problem with how we access stdin. I think it's related to #460.

@cameel cameel changed the title solcjs --standard-json gives error in fs node TypeError: Cannot read properties of undefined (reading '1') in solc.js when passing the input for --standard-json via stdin May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Implement
Development

No branches or pull requests

2 participants