[SOLVED] npm start some compilation error. Browser says Cannot GET /

Question

This Content is from Stack Overflow. Question asked by Aditya Rawal

./src/main.ts – Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Emit

./src/polyfills.ts – Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Emit

./node_modules/css-loader/dist/runtime/api.js – Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: EPERM: operation not permitted, mkdir ‘E:CapstoneshopForHomeHome-Products.angular’

./node_modules/css-loader/dist/runtime/sourceMaps.js – Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: EPERM: operation not permitted, mkdir ‘E:CapstoneshopForHomeHome-Products.angular’

./node_modules/webpack-dev-server/client/index.js?protocol=auto%3A&username=&password=&hostname=0.0.0.0&port=0&pathname=%2Fng-cli-ws&logging=info&reconnect=10 – Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: EPERM: operation not permitted, mkdir ‘E:CapstoneshopForHomeHome-Products.angular’

./src/styles.css – Error: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
HookWebpackError: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: EPERM: operation not permitted, mkdir ‘E:CapstoneshopForHomeHome-Products.angular’

Error: Failed to initialize Angular compilation – NGCC failed.

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

× Failed to compile.

Solution

do you have the right permissions? It says the compiler was unable to create a folder in the mentioned directory. Check this line Error: EPERM: operation not permitted, mkdir ‘E:\Capstone\shopForHome\Home-Products.angular’

Please run it as admin and try. If not, changing the folder permission would work fine as well.


Posting it as an answer because the above answer doesn’t actually solve the problem.

Answered by Prajwal


This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 4.0.

people found this article helpful. What about you?