gulp-slang
gulp-slang copied to clipboard
Failed on Windows
Any idea what's going on with Windows? Googling the error hasn't been helpful, no matter which way I hunt it down.
On a file change, gulp-slang reports a failed upload:
File Upload Failed: 500 - javax.jcr.RepositoryException: Incorrect workspace. Expecting /C. Received crx.default
I've never changed my workspace, and the same setting works on macOS machines.
@rkbrewer I just debugged this for a current project and it ended up being an issue with the way it was searching the path on Windows machines, searching for jcr_root/
and that forward slash would work on Mac, not Windows.
We had it fixed and working with a local package and after prepping a PR into this repo found it was fixed in a later release: https://github.com/mnlsn/gulp-slang/commit/8fcee043ed96afc79fbad4e4e45c438d0b3c7d52 -- Should be safe to use cross environment now.
I'm still experiencing this error File Upload Failed: 500 - javax.jcr.RepositoryException: Incorrect workspace. Expecting /C. Received crx.default
on Windows machine, but it works on Mac.
This issue happens because of how Windows parses paths. We need to remove C:
from the destPath
variable, before it gets made part of the URL
variable:
if (destPath.indexOf('C:') !== -1) {
destPath = destPath.replace('C:', '');
}