Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative paths fail due to regexp typo #9

Closed
dapetcu21 opened this issue Oct 5, 2015 · 7 comments
Closed

Relative paths fail due to regexp typo #9

dapetcu21 opened this issue Oct 5, 2015 · 7 comments

Comments

@dapetcu21
Copy link

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.

@stephenmathieson
Copy link

any word on this?

@engageft3
Copy link

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)

@NicholasGWK
Copy link

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

@NicholasGWK
Copy link

Worked around it by putting '/' at the beginning of my path in output for webpack config, causes it to think it's *nix

@stephenmathieson
Copy link

@NicholasGWK thats what ive got too. pretty annoying...

screen shot 2016-05-06 at 09 05 06

@NicholasGWK
Copy link

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

@sokra
Copy link
Member

sokra commented Sep 7, 2016

output.path must be an absolute value. This is also required by webpack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants