Relative paths fail due to regexp typo
dapetcu21 opened this issue · 7 comments
https://github.com/webpack/memory-fs/blob/master/lib/MemoryFileSystem.js#L39
I think it should be /^[A-Za-z]+/
instead of /^[A-Za-z]:/
over there.
any word on this?
Tried implementing @dapetcu21's solution and I'm still getting the same error:
throw new MemoryFileSystemError(errors.code.EINVAL, path);
^
Error: invalid argument
at pathToArray (node_modules\webpack-dev-middleware\node_modules\memory-fs\lib\MemoryFileSystem.js:44:10)
at MemoryFileSystem.mkdirpSync (node_modules\webpack-dev-middleware\node_modules\memory-fs\lib\MemoryFileSystem.js:139:13)
at MemoryFileSystem.(anonymous function) [as mkdirp] (node_modules\webpack-dev-middleware\node_modules\memory-fs\lib\MemoryFileSystem.js:279:34)
at Compiler.<anonymous> (node_modules\webpack\lib\Compiler.js:229:25)
at Compiler.applyPluginsAsync (node_modules\webpack\node_modules\tapable\lib\Tapable.js:60:69)
at Compiler.emitAssets (node_modules\webpack\lib\Compiler.js:226:7)
at Watching.<anonymous> (node_modules\webpack\lib\Compiler.js:54:18)
at node_modules\webpack\lib\Compiler.js:403:12
at Compiler.next (node_modules\webpack\node_modules\tapable\lib\Tapable.js:67:11)
at Compiler.<anonymous> (node_modules\awesome-typescript-loader\dist\instance.js:275:9)
@ engageft3 Try logging the path and see what it is. For me the problem was my output path in webpack.config.js wasn't absolute, and had a ./build rather than build. But, the regex still had to be changed.
Worked around it by putting '/' at the beginning of my path in output for webpack config, causes it to think it's *nix
@NicholasGWK thats what ive got too. pretty annoying...
@stephenmathieson Yeah that workaround works for me, I think it address the path correctly in the in memory system. Reminder for anyone who reads this to only do this in the dev config, otherwise if you're on Windows the production webpack build with start writing to C:/build or similar :).
output.path
must be an absolute value. This is also required by webpack.