question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ngcc - angular 9.1 - docker container ENOENT on /proc/...

See original GitHub issue

🐞 bug report

Affected Package

The issue is caused by package @angular/....

Is this a regression?

Yes, the previous version in which this bug was not present was: 9.0.*

Description

ngcc compilation goes ENOENT on /proc file in container environment

πŸ”¬ Minimal Reproduction

In node:lts or node:lts-alpine container run the ngcc compiler ( also w/ --async false)

πŸ”₯ Exception or Error


$ ngcc --async false
Error: ENOENT: no such file or directory, lstat '/proc/104/fd/19'
    at Object.lstatSync (fs.js:923:3)
    at NodeJSFileSystem.lstat (/ws/node_modules/@angular/compiler-cli/src/ngtsc/file_system/src/node_js_file_system.js:41:72)
    at CachedFileSystem.lstat (/ws/node_modules/@angular/compiler-cli/src/ngtsc/file_system/src/cached_file_system.js:131:38)
    at /ws/node_modules/@angular/compiler-cli/ngcc/src/entry_point_finder/directory_walker_entry_point_finder.js:102:37
    at Array.filter (<anonymous>)
    at DirectoryWalkerEntryPointFinder.walkDirectoryForEntryPoints (/ws/node_modules/@angular/compiler-cli/ngcc/src/entry_point_finder/directory_walker_entry_point_finder.js:101:18)
    at /ws/node_modules/@angular/compiler-cli/ngcc/src/entry_point_finder/directory_walker_entry_point_finder.js:108:76
    at Array.forEach (<anonymous>)
    at DirectoryWalkerEntryPointFinder.walkDirectoryForEntryPoints (/ws/node_modules/@angular/compiler-cli/ngcc/src/entry_point_finder/directory_walker_entry_point_finder.js:105:18)
    at /ws/node_modules/@angular/compiler-cli/ngcc/src/entry_point_finder/directory_walker_entry_point_finder.js:108:76

🌍 Your Environment

Angular Version:



     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / β–³ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 9.1.0
Node: 12.16.1
OS: linux x64

Angular: 9.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router, service-worker
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.0
@angular-devkit/build-angular     0.901.0
@angular-devkit/build-optimizer   0.901.0
@angular-devkit/build-webpack     0.901.0
@angular-devkit/core              9.1.0
@angular-devkit/schematics        9.1.0
@angular/cdk                      9.2.0
@angular/flex-layout              9.0.0-beta.29
@angular/material                 9.2.0
@ngtools/webpack                  9.1.0
@schematics/angular               9.1.0
@schematics/update                0.901.0
rxjs                              6.5.4
typescript                        3.8.3
webpack                           4.42.0

Anything else relevant?

If relevant, the underlying system is a MacOS Catalina v. 10.15.4 (19E266)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
petebacondarwincommented, Mar 31, 2020

The non-existing path caused ngcc to start traversing the file-system, looking for entry-points, at the root /. So I believe the answer to your question is that on your local machine your logged in user had access to all the files on the file-system, and so ngcc was able to traverse all the files without any errors - but perhaps within Docker the user had limited rights to read some files, and so when ngcc tried to traverse important OS files like /proc/... then it was disallowed access.

0reactions
angular-automatic-lock-bot[bot]commented, May 2, 2020

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 9 - Error with ivy compilation on Docker - Stack Overflow
You are running your build command as the wrong user. What your image is doing is installing the dependencies and npm as root....
Read more >
Angular & Docker: Speed up your builds with ngcc - Medium
Docker is a tool used to run and deploy containers. It can also be used to create reproducible Angular builds and, to some…...
Read more >
Angular + Docker with a Big Hug from Spring Boot
Use Docker to build & deploy an Angular app! Includes how to combine Angular + Spring Boot into a JAR, dockerize it, and...
Read more >
Dockerfile for Angular production build
Usually ngcc is run during the ng build but for the dock image to reduce the build time we will call the pre-compilation...
Read more >
Image Layer Details - teracy/angular-cli:1.0.0-rc.2 | Docker Hub
/bin/sh -c curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz". 13.34 MB. 11. ENV YARN_VERSION=0.21.3.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found