Home > Enterprise >  npm start some compilation error. Browser says Cannot GET /
npm start some compilation error. Browser says Cannot GET /

Time:07-16

./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:\Capstone\shopForHome\Home-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:\Capstone\shopForHome\Home-Products\.angular'

./node_modules/webpack-dev-server/client/index.js?protocol=auto:&username=&password=&hostname=0.0.0.0&port=0&pathname=/ng-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:\Capstone\shopForHome\Home-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:\Capstone\shopForHome\Home-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.

CodePudding user response:

You have tried this in VS Code, when making a new project like npm and flutter, VS Code will ask for your authorization/permission if you trust them to author the files within that directory

CodePudding user response:

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.

  • Related