diff --git a/remix-solidity/src/compiler/compiler.js b/remix-solidity/src/compiler/compiler.js index eb0e423610..4238cb6a0f 100644 --- a/remix-solidity/src/compiler/compiler.js +++ b/remix-solidity/src/compiler/compiler.js @@ -72,7 +72,12 @@ function Compiler (handleImportCall) { function onInternalCompilerLoaded () { if (worker === null) { - var compiler = solc(window.Module) + var compiler + if (typeof (window) === 'undefined') { + compiler = require('solc') + } else { + compiler = solc(window.Module) + } compileJSON = function (source, optimize, cb) { var missingInputs = []