Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm' #98

Closed
opened 2025-08-09 17:15:00 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @lucipacurar on 4/17/2018

Hi guys,

I'm using the new dotnet core 2.1 angular-cli template to create a new app which I'm trying to deploy to Service Fabric as a microservice. After the app is deployed to Service Fabric, I get the following error when I try to open it:

An unhandled exception occurred while processing the request.
AggregateException: One or more errors occurred.
System.Threading.Tasks.Task.GetResultCore(bool waitCompletionNotification)

InvalidOperationException: The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm'

TypeError: Cannot read property 'get' of undefined

at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:83:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:214:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:252:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7
at Array.forEach (<anonymous>)
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:178:20)
at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:47:53
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^

TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at emitOne (events.js:116:13)
at process.emit (events.js:211:7)
at process._fatalException (bootstrap_node.js:374:26)
Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm'

TypeError: Cannot read property 'get' of undefined

I know this might not be a template error and it might be related to Service Fabric, but 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm' seems pretty odd to me because Service Fabric starts the application as NETWORK SERVICE and not as SYSTEM. Throughout the process list I have no node process running as SYSTEM. I'm assuming it fails to start and it closes before I'm able to see it.

Is there a way to avoid running node as SYSTEM?

*Originally created by @lucipacurar on 4/17/2018* Hi guys, I'm using the new dotnet core 2.1 angular-cli template to create a new app which I'm trying to deploy to Service Fabric as a microservice. After the app is deployed to Service Fabric, I get the following error when I try to open it: ``` An unhandled exception occurred while processing the request. AggregateException: One or more errors occurred. System.Threading.Tasks.Task.GetResultCore(bool waitCompletionNotification) InvalidOperationException: The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm' TypeError: Cannot read property 'get' of undefined at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18) at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:83:20 at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:214:22) at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:252:24 at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7 at Array.forEach (<anonymous>) at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13 at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25) at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:178:20) at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:47:53 C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205 if (npm.config.get('json')) { ^ TypeError: Cannot read property 'get' of undefined at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18) at emitOne (events.js:116:13) at process.emit (events.js:211:7) at process._fatalException (bootstrap_node.js:374:26) Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm' TypeError: Cannot read property 'get' of undefined ``` I know this might not be a template error and it might be related to Service Fabric, but `'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm'` seems pretty odd to me because Service Fabric starts the application as `NETWORK SERVICE` and not as `SYSTEM`. Throughout the process list I have no `node` process running as `SYSTEM`. I'm assuming it fails to start and it closes before I'm able to see it. Is there a way to avoid running `node` as `SYSTEM`?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#98
No description provided.