sass.js icon indicating copy to clipboard operation
sass.js copied to clipboard

require('sass.js') Thrown: 6439624

Open dsdenes opened this issue 6 years ago • 1 comments

sass.js npm package throws error on require.

How to reproduce:

$ node -v
v8.12.0
$ npm i sass.js
+ [email protected]
added 1 package from 3 contributors and audited 1 package in 1.089s
found 0 vulnerabilities
$ node
> try { require('sass.js') } catch (err) { console.log('sass.js: ' + err);}
sass.js: 6439624

Expected: Not to throw exception

dsdenes avatar Nov 07 '18 17:11 dsdenes

I don't quite understand what's going on in the REPL. Things work fine when executed from file:

➜  echo "require('sass.js'); console.log('hello');" > index.js && node index.js
hello

I'm a bit lost why in the REPL the error 6439624 (type Number) is being thrown. The only reference google yields is this comment - so I suspect that somehow crypto isn't available in a way emscripten expects.

Since you're bringing the REPL into the mix… any idea what might be going wrong here?

rodneyrehm avatar Nov 13 '18 14:11 rodneyrehm