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.

solcjs --standard-json - TypeError: Second argument needs to be a buffer

See original GitHub issue

Hello,

solcjs --standard-json myinput.json doesn’t work. See the error bellow.

$ echo "{}" | solcjs --standard-json
/usr/local/lib/node_modules/solc/node_modules/graceful-fs/polyfills.js:144
        throw er
        ^

TypeError: Second argument needs to be a buffer
    at Object.fs.readSync (fs.js:681:18)
    at Object.readSync (/usr/local/lib/node_modules/solc/node_modules/graceful-fs/polyfills.js:138:28)
    at Object.<anonymous> (/usr/local/lib/node_modules/solc/solcjs:65:18)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
tzapucommented, Jun 21, 2018

@axic i tried to fix the tests here https://github.com/ethereum/solc-js/pull/229, would love to be a be able to use standard jsons 😄 thanks

1reaction
feuGeneAcommented, Aug 7, 2018

@axic , what’s your disposition on this issue and the proposed fix?

I’m using the changes from @tzapu 's PR #229 , which seem to include your own changes as well, and it’s all working for my purposes.

I’d love to see the fix merged into master so that I can go into production with my own development that’s depending on it, and I see @snd and others are waiting on it as well.

Are there any reservations you have? Is there anything we can do to help facilitate?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ethereum/solidity - Gitter
Hi, I am using truffle and I have developed two contracts. The second contract needs the address of the first contract as input....
Read more >
Using the Compiler — Solidity 0.8.17 documentation
The process will always terminate in a “success” state and report any errors via the JSON output. The option --base-path is also processed...
Read more >
Solidity Documentation - Read the Docs
docker run ethereum/solc:stable --standard-json < input.json > output.json ... vous devriez forker Solidity et ajouter votre fork comme un second dépot.
Read more >
Code not compiling in nodejs,throws out an unexpected error ...
In my case the problem was that the File.sol was raw solidity smart contract, but you need to put Compiler Standard Input JSON...
Read more >
Documentation - Ethers.js
They offer a standard JSON-RPC interface and have fairly high capacity without the ... A second optional parameter allows API keys to be...
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