evalmd icon indicating copy to clipboard operation
evalmd copied to clipboard

evalmd fails on windows

Open kunalspathak opened this issue 8 years ago • 3 comments

I tried running on "qs" README.md and it fails with below errors.

Tried debugging a bit and it is happening because of rendering error:

Markdown contents

var decoder = require('qs-iconv/decoder')('shift_jis');
var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder });
assert.deepEqual(obj, { a: 'こんにちは!' });

Rendered contents


var decoder = require('qsE:\git\qs\node_modules\qs-iconv\decoder('shift_jis');
var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder });
assert.deepEqual(obj, { a: 'こんにちは!' });

E:\git\qs>node C:\Users\kpathak\AppData\Local\nvs\chakracore-nightly\8.0.0-nightly2017031520fa6b1909\x64\node_modules\evalmd\bin\eval-markdown.js README.md
evalmd info it worked if it ends with ok
evalmd info README.md running blocks 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47
---------------------------->C:\Users\kpathak\AppData\Local\nvs\chakracore-nightly\8.0.0-nightly2017031520fa6b1909\x64\node.exe C:\Users\kpathak\AppData\Local\Temp\evalmd\0fb09d0b3d50fc6ee35c337e817c1dc9.js
evalmd ERR! SyntaxError: Expected ')'
evalmd ERR!    at createScript (vm.js:53:3)
evalmd ERR!    at runInThisContext (vm.js:95:3)
evalmd ERR!    at Module.prototype._compile (module.js:543:3)
evalmd ERR!    at Module._extensions[.js] (module.js:580:3)
evalmd ERR!    at Module.prototype.load (module.js:488:3)
evalmd ERR!    at tryModuleLoad (module.js:447:5)
evalmd ERR!    at Module._load (module.js:439:3)
evalmd ERR!    at Module.runMain (module.js:605:3)
evalmd ERR!    at run (bootstrap_node.js:429:7)
evalmd ERR!    at startup (bootstrap_node.js:148:9)
evalmd ERR!
evalmd ERR!    at Module._extensions[.js] (module.js:580:3)
evalmd ERR!    at Module.prototype.load (module.js:488:3)
evalmd ERR!    at tryModuleLoad (module.js:447:5)
evalmd ERR!    at Module._load (module.js:439:3)
evalmd ERR!    at Module.runMain (module.js:605:3)
evalmd ERR!    at run (bootstrap_node.js:429:7)
evalmd ERR!    at startup (bootstrap_node.js:148:9)
evalmd ERR!    at Anonymous function (chakra_shim.js:283:20)
evalmd ERR!    at withStackTraceLimitOffset (chakra_shim.js:206:7)
evalmd ERR!    at newType (chakra_shim.js:282:9)
evalmd ERR!    at exithandler (child_process.js:225:7)
evalmd ERR!    at emitTwo (events.js:106:5)
evalmd ERR!    at emit (events.js:194:7)
evalmd ERR!    at maybeClose (internal/child_process.js:893:5)
evalmd ERR!    at Anonymous function (internal/child_process.js:335:11)
evalmd ERR!    at emitOne (events.js:96:5)
evalmd ERR!    at emit (events.js:191:7)
evalmd ERR!    at Anonymous function (net.js:513:7)

kunalspathak avatar Mar 23 '17 23:03 kunalspathak

Considering this passes on non-Windows, this seems to be an evalmd bug.

@kunalspathak however, I didn't realize you were running on chakranode. Can you reproduce it with node proper? Anything that works on normal node and breaks on chakranode is a chakranode bug.

ljharb avatar Mar 24 '17 00:03 ljharb

@ljharb , it does fail for node-v8. So it is a bug in evalmd and not in node-chakracore.

E:\git\qs>node -pe process.versions
{ http_parser: '2.7.0',
  node: '7.5.0',
  v8: '5.4.500.48',
  uv: '1.10.2',
  zlib: '1.2.8',
  ares: '1.10.1-DEV',
  modules: '51',
  openssl: '1.0.2k',
  icu: '58.2',
  unicode: '9.0',
  cldr: '30.0.3',
  tz: '2016j' }

E:\git\qs>node C:\Users\kpathak\AppData\Local\nvs\node\7.5.0\x64\node_modules\evalmd\bin\eval-markdown.js README.md
evalmd info it worked if it ends with ok
evalmd info README.md running blocks 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47
evalmd ERR! C:\Users\kpathak\AppData\Local\Temp\evalmd\0fb09d0b3d50fc6ee35c337e817c1dc9.js:418
evalmd ERR! var encoder = require('qsE:\git\qs\node_modules\qs-iconv\encoder('shift_jis');
evalmd ERR!                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
evalmd ERR! SyntaxError: missing ) after argument list
evalmd ERR!     at Object.exports.runInThisContext (vm.js:73:16)
evalmd ERR!     at Module._compile (module.js:543:28)
evalmd ERR!     at Object.Module._extensions..js (module.js:580:10)
evalmd ERR!     at Module.load (module.js:488:32)
evalmd ERR!     at tryModuleLoad (module.js:447:12)
evalmd ERR!     at Function.Module._load (module.js:439:3)
evalmd ERR!     at Module.runMain (module.js:605:10)
evalmd ERR!     at run (bootstrap_node.js:418:7)
evalmd ERR!     at startup (bootstrap_node.js:139:9)
evalmd ERR!     at bootstrap_node.js:533:3
evalmd ERR!     at ChildProcess.exithandler (child_process.js:211:12)
evalmd ERR!     at emitTwo (events.js:106:13)
evalmd ERR!     at ChildProcess.emit (events.js:192:7)
evalmd ERR!     at maybeClose (internal/child_process.js:890:16)
evalmd ERR!     at Socket.<anonymous> (internal/child_process.js:334:11)
evalmd ERR!     at emitOne (events.js:96:13)
evalmd ERR!     at Socket.emit (events.js:189:7)
evalmd ERR!     at Pipe._handle.close [as _onclose] (net.js:501:12)

kunalspathak avatar Mar 24 '17 01:03 kunalspathak

@kunalspathak can you still reproduce this on latest master?

ljharb avatar Feb 09 '20 20:02 ljharb