5

I am getting an error while running ng build--prod. And I also tried to run npm install but I am getting the same error on that also.

ERROR in Module build failed: TypeError: Cannot read property 'replace' of undefined
    at normalizeBackSlashDirection (D:\angular\blog\node_modules\webpack\lib\RequestShortener.js:15:17)
    at new RequestShortener (D:\angular\blog\node_modules\webpack\lib\RequestShortener.js:25:15)
    at new Compiler (D:\angular\blog\node_modules\webpack\lib\Compiler.js:136:27)
    at Compiler.createChildCompiler (D:\angular\blog\node_modules\webpack\lib\Compiler.js:371:25)
    at Compilation.createChildCompiler (D:\angular\blog\node_modules\webpack\lib\Compilation.js:1851:24)
    at Object.pitch (D:\angular\blog\node_modules\mini-css-extract-plugin\dist\loader.js:70:43)
1

1 Answer 1

0

I know this is late but since I ran into the same issue recently, I would leave my thoughts here which could be helpful to someone. This appears to be an issue in mini-css-extract-plugin. You could try removing that and using a css-loader followed by css to string loader to get rid of the error.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.