我一直在尝试在本地运行演示应用程序,但是由于gulp构建过程,在运行npm install之后遇到了问题。 该错误与以下代码块有关:
// 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}`;
}
gulp构建失败,并显示以下消息:
错误:C:\ Users \ foobar \ Downloads \ xterm.js / C:/Users/foobar/Downloads/xterm.js/lib包含无效的WIN32路径字符。
我已经注释掉了此代码,并且一切都按预期工作,但是我不确定是否应该PR此修复程序,因为根据上面的注释,该代码在其他情况下可能会中断?
@travisobregon我无法在本地进行复制,您可以尝试进行此更改并查看是否有效吗?
if (path.normalize(outDir).indexOf(__dirname) !== 0) {
outDir = `${__dirname}/${path.normalize(outDir)}`;
}
@Tyriar我已经应用了更改,它确实起作用了。