You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
It seems that on the Windows platform, the generated JavaScript from Ceylon JS projects usees \ as the path separator in the require statements for requiring JS module files.
This leads to the following example line, which is broken since "" is a JS escape character:
Which causes a SyntaxError when attempting to run the Ceylon JS project module:
SyntaxError: Unexpected token ILLEGAL
at Object.exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:513:28)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at repl:1:9
at REPLServer.defaultEval (repl.js:272:27)
Is this a bug?
I’m pretty sure it is. The compile-time platform isn’t even necessarily the same as the run-time platform, so there’s no reason to use a different path separator – that’s something that the require function needs to sort out IMO.
I have a possible fix ready (EDIT: now in #6824), but I can’t test it myself, because I don’t have access to a Windows box.
The text was updated successfully, but these errors were encountered:
Reported by @lucono on ceylon-users:
I’m pretty sure it is. The compile-time platform isn’t even necessarily the same as the run-time platform, so there’s no reason to use a different path separator – that’s something that the
require
function needs to sort out IMO.I have a possible fix ready (EDIT: now in #6824), but I can’t test it myself, because I don’t have access to a Windows box.
The text was updated successfully, but these errors were encountered: