Report this

What is the reason for this report?

Error when installing NX monorepo with Angular CLI decorator

Posted on May 21, 2022

I am trying to deploy and Angular Universal app in a NX monorepo onto app platform, but I get the follow error during in the postinstall step after yarn install when the NX monorepo executes its decorate-angular-cli.js. It is trying to move a sock file in a cache directory inside node_modules from what I understand. I’m definitely not an expert at NX and am starting to wonder if I’m in over my head, help!

[frontend] [2022-05-21 20:02:12] [5/5] Building fresh packages...
[frontend] [2022-05-21 20:03:13] $ node ./decorate-angular-cli.js && ngcc --properties es2015 browser module main
[frontend] [2022-05-21 20:03:15] 
[frontend] [2022-05-21 20:03:15]  >  NX   Angular CLI has been decorated to enable computation caching.
[frontend] [2022-05-21 20:03:15] 
[frontend] [2022-05-21 20:03:22] Processing legacy "View Engine" libraries:
[frontend] [2022-05-21 20:03:22] - ngx-file-drop [es2015/esm2015] (georgipeltekov/ngx-file-drop)
[frontend] [2022-05-21 20:03:24] - ngx-file-drop [main/umd] (georgipeltekov/ngx-file-drop)
[frontend] [2022-05-21 20:03:24] Encourage the library authors to publish an Ivy distribution.
[frontend] [2022-05-21 20:03:25] Done in 349.58s.
[frontend] [2022-05-21 20:03:25] 
[frontend] [2022-05-21 20:04:44] cp: cannot create special file '/layers/digitalocean_node/node_modules/.cache/nx/d/d.sock': Operation not supported
[frontend] [2022-05-21 20:04:44] unable to invoke layer creator
[frontend] [2022-05-21 20:04:44] caching node_modules for future builds: exit status 1
[frontend] [2022-05-21 20:04:44] ERROR: failed to build: exit status 1


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

The issue you’re experiencing seems to be related to an operation trying to create a special file in the cache directory, but it’s not supported on your configuration. Understandably, NX monorepos could be complex if you’re not familiar with them.

I’d recommend looking into the process that is calling the ‘cp’ command. This process is trying to create a .sock file, which is a Unix Domain Socket file, and it seems that your current environment or settings aren’t supporting this operation. You may need to review your permissions. Also, check the usage of decorate-angular-cli.js, Angular Universal App, and NX as it pertains to your app platform.

Learn more about managing and troubleshooting your Angular Universal App on DigitalOcean in the DigitalOcean documentation.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Dark mode is coming soon.