I have been trying to run the demo application locally, but have run into issues after running npm install because of the gulp build process. The error is related to this block of code:
// Under some environments like TravisCI, this comes out at absolute which can
// break the build. This ensures that the outDir is absolute.
if (outDir.indexOf(__dirname) !== 0) {
outDir = `${__dirname}/${outDir}`;
}
The gulp build fails with a message such as:
Error: C:\Users\foobar\Downloads\xterm.js/C:/Users/foobar/Downloads/xterm.js/lib contains invalid WIN32 path characters.
I have commented this code out and everything works as expected, but I am not sure if I should PR this fix because according to the comment above, the code may break in other situations?
@travisobregon I can't repro locally, could you try making this change and seeing if it works?
if (path.normalize(outDir).indexOf(__dirname) !== 0) {
outDir = `${__dirname}/${path.normalize(outDir)}`;
}
@Tyriar I've applied the change and it does work.
Great, PR is out https://github.com/sourcelair/xterm.js/pull/1028