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.

TypeError: soljson.cwrap is not a function

See original GitHub issue

My Solidity Language Server crashes every time with the error: “TypeError: soljson.cwrap is not a function”

This is my settings:

"solidity.compileUsingRemoteVersion" : "0.6.12",
    "solidity.enabledSolhint": true,
    "solidity.validationDelay": 1500
    "solidity.solhintRules": {
    }

Here is the full error info:

TypeError: soljson.cwrap is not a function
TypeError: soljson.cwrap is not a function
c:\Users\mudge\.vscode\extensions\juanblanco.solidity-0.0.74\node_modules\solc\soljson.js:1
null;var Module=typeof Module!=="undefined"?Module:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram="./this.program";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;var nodeFS;var nodePath;if(ENV

RuntimeError: abort(TypeError: soljson.cwrap is not a function). Build with -s ASSERTIONS=1 for more info.
    at process.abort (c:\Users\mudge\.vscode\extensions\juanblanco.solidity-0.0.74\node_modules\solc\soljson.js:1:12830)
    at process.emit (events.js:203:13)
    at processPromiseRejections (internal/process/promises.js:201:33)
    at processTicksAndRejections (internal/process/task_queues.js:86:32)
[Info  - 9:36:31 AM] Connection to server got closed. Server will restart.
TypeError: soljson.cwrap is not a function
TypeError: soljson.cwrap is not a function
c:\Users\mudge\.vscode\extensions\juanblanco.solidity-0.0.74\node_modules\solc\soljson.js:1
null;var Module=typeof Module!=="undefined"?Module:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram="./this.program";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;var nodeFS;var nodePath;if(ENV

RuntimeError: abort(TypeError: soljson.cwrap is not a function). Build with -s ASSERTIONS=1 for more info.
    at process.abort (c:\Users\mudge\.vscode\extensions\juanblanco.solidity-0.0.74\node_modules\solc\soljson.js:1:12830)
    at process.emit (events.js:203:13)
    at processPromiseRejections (internal/process/promises.js:201:33)
    at processTicksAndRejections (internal/process/task_queues.js:86:32)
[Info  - 9:36:45 AM] Connection to server got closed. Server will restart.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
mudgencommented, Aug 2, 2020

@juanfranblanco Thank you that works!

0reactions
juanfranblancocommented, Nov 30, 2020

@pitieu What were your settings?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: soljson.cwrap is not a function #226
I am trying to import solc js in react mobx project. But when use code "var solc = require('solc')", i am getting "Type...
Read more >
Truffle Suite with TypeError: soljson.cwrap is not a function
I had trouble in executing truffle compile since hoped to communicate with Ethereum using web3.js, for the purpose of translating Contract ...
Read more >
ethereum/remix-dev - Gitter
what is this TypeError: soljson.cwrap is not a function error ? yann300. @yann300. That s a bad instantiation of solc.. where did u...
Read more >
How to use solc-js with Jest? - Ethereum Stack Exchange
Here is an error: TypeError: soljson.cwrap is not a function. If removed from this code all Jest things (describe, test), it works fine....
Read more >
Programming Project - Phase 2 - Ethereum Smart Contract ...
truffle compile Compiling your contracts... =========================== Error: TypeError: soljson.Pointer_stringify is not a function at Object.compile ...
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