Infinite Loop with Docker / `npm -g install @angular/cli`
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [ x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
Node v8.3.0 NPM v5.3.0
OS: Docker buildpack-deps:jessie
Repro steps.
The log given by the failure.
RUN npm install -g @angular/cli
...removed...
> node-sass@4.5.3 postinstall /usr/local/lib/node_modules/@angular/cli/node_modules/node-sass
> node scripts/build.js
Building: /usr/local/bin/node /usr/local/lib/node_modules/@angular/cli/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/bin/node',
gyp verb cli '/usr/local/lib/node_modules/@angular/cli/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using node-gyp@3.6.2
gyp info using node@8.3.0 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import platform; print(platform.python_version());"` returned: "2.7.9\n"
gyp verb get node dir no --target version specified, falling back to host node version: 8.3.0
gyp verb command install [ '8.3.0' ]
gyp verb install input version string "8.3.0"
gyp verb install installing version: 8.3.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp WARN EACCES user "undefined" does not have permission to access the dev dir "/root/.node-gyp/8.3.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp"
gyp verb tmpdir == cwd automatically will remove dev files after to save disk space
gyp verb command install [ '8.3.0' ]
gyp verb install input version string "8.3.0"
gyp verb install installing version: 8.3.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 8.3.0
gyp verb ensuring nodedir is created /usr/local/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp/8.3.0
gyp WARN EACCES user "nobody" does not have permission to access the dev dir "/usr/local/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp/8.3.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp"
gyp verb tmpdir == cwd automatically will remove dev files after to save disk space
gyp verb command install [ '8.3.0' ]
gyp verb install input version string "8.3.0"
…repeating infinitely…
Note RUN npm install -g node-gyp
seems to work fine.
Desired functionality.
Installs properly
Mention any other details that might be useful.
N/A
Issue Analytics
- State:
- Created 6 years ago
- Reactions:16
- Comments:18
Top Results From Across the Web
Infinite loop while attempting to install angular-cli using npm
I have tried a couple times to install angular-cli on Mac globally via npm, resulting in the same infinite loop that could go...
Read more >Dockerizing an Angular App - Michael Herman
Docker is a containerization tool used to streamline application development and deployment workflows across various environments.
Read more >How to set up an Angular CLI project with Docker Compose
The first step is to install the Angular CLI on your local machine. The Angular CLI is the command line interface that provides...
Read more >FAQs - CodeSandbox
We've client templates for: React, Vue, Angular, Preact, Svelte, Dojo, CX, ... all scenarios where infinite loops can occur, such as with incomplete...
Read more >Changelog - Cypress Documentation
Installing Cypress on your system now requires Node.js 14, 16 or 18+. ... This enables support for projects that don't adhere to Angular...
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
This bug is still reproducible on
Ubuntu Xenial
andDebian Jessie
. I appreciate that there is a workaround but shouldn’t the issue remain open since there is no actual fix just workarounds?For those coming from google to quickly get around this use this command to install:
the
--unsafe
gets it to complete without the loopStill getting this in March 2018:
This spins into an infinite loop when in gets to the
gyp
build part. Using @PhilThurston’s--unsafe
option helped me.Why is this still a problem?