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:
- Created 3 years ago
- Comments:11 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.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.