Xterm.js: Running the demo app fails on npm install

Created on 4 Oct 2017  ·  3Comments  ·  Source: xtermjs/xterm.js

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?

Details

  • Browser and browser version: -
  • OS version: Windows 7
  • xterm.js version: Cloned the project from the v3 branch

Steps to reproduce

  1. Follow the steps to run the demo app in the README
typbug

All 3 comments

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

goxr3plus picture goxr3plus  ·  3Comments

pfitzseb picture pfitzseb  ·  3Comments

ghost picture ghost  ·  4Comments

Tyriar picture Tyriar  ·  4Comments

fabiospampinato picture fabiospampinato  ·  4Comments