angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Cannot install @angular/cli because of dependency issue

Open DirkWillem opened this issue 8 years ago • 76 comments

When I try to install @angular/cli, I get the following error:

npm install -g @angular/cli@latest
npm ERR! code ETARGET
npm ERR! notarget No matching version found for require-from-string@^1.1.0
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'cosmiconfig'
npm ERR! notarget

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/dirk/.npm/_logs/2018-01-06T18_58_49_094Z-debug.log

Versions

N/A

Repro steps

Run

npm install @angular/cli@latest

Observed behavior

Angular CLI does not install

Desired behavior

Angular CLI installs

Mention any other details that might be useful (optional)

The package require-from-string seemed to be gone from NPM for a while, but also seems to be back now

DirkWillem avatar Jan 06 '18 19:01 DirkWillem

I was able to install deps for a project and it seems to be working. I didn't try to re-install angular-cli tho

bnymncoskuner avatar Jan 06 '18 19:01 bnymncoskuner

The only day I had time to check out new features of ng 5. Leftpad 2.0..

nektoDev avatar Jan 06 '18 19:01 nektoDev

What a lovely start for my Angular training journey :D At least I was able to find this issue thread instantly.

hfakar avatar Jan 06 '18 20:01 hfakar

Alright NPM has issued a warning to not attempt to republish the missing packages, so hold your horses! https://github.com/npm/registry/issues/255#issuecomment-355771177

Temporal solutions are welcome though

patrickoliveras avatar Jan 06 '18 20:01 patrickoliveras

Пипец хлопцы, и шо рабить??

mikestotik avatar Jan 06 '18 20:01 mikestotik

@patrickoliveras, Hi! @EstebanFuentealba published a workaround.

npm install https://github.com/floatdrop/require-from-string/tarball/v1.1.0 --save npm install

Regards!

joseferrercba avatar Jan 06 '18 20:01 joseferrercba

@patrickoliveras have you seen any word on a timeline for the fix for this?

keenanamigos avatar Jan 06 '18 20:01 keenanamigos

It's literally 29 lines of code:

'use strict';

var Module = require('module');
var path = require('path');

module.exports = function requireFromString(code, filename, opts) {
	if (typeof filename === 'object') {
		opts = filename;
		filename = undefined;
	}

	opts = opts || {};
	filename = filename || '';

	opts.appendPaths = opts.appendPaths || [];
	opts.prependPaths = opts.prependPaths || [];

	if (typeof code !== 'string') {
		throw new Error('code must be a string, not ' + typeof code);
	}

	var paths = Module._nodeModulePaths(path.dirname(filename));

	var m = new Module(filename, module.parent);
	m.filename = filename;
	m.paths = [].concat(opts.prependPaths).concat(paths).concat(opts.appendPaths);
	m._compile(code, filename);

	return m.exports;
};

mcquiggd avatar Jan 06 '18 20:01 mcquiggd

image

https://status.npmjs.org/incidents/41zfb8qpvrdj

joseferrercba avatar Jan 06 '18 20:01 joseferrercba

but install dont still dont works

ByMiles avatar Jan 06 '18 20:01 ByMiles

@keenanamigos you can follow the incident here: https://status.npmjs.org/incidents/41zfb8qpvrdj

patrickoliveras avatar Jan 06 '18 20:01 patrickoliveras

@patrickoliveras thank you!

keenanamigos avatar Jan 06 '18 20:01 keenanamigos

temp solution is not working either

Ekta17 avatar Jan 06 '18 20:01 Ekta17

its just wait now

bjcCin avatar Jan 06 '18 20:01 bjcCin

yeap. now have problems with pinkie-promise@^2.0.0 package

joseferrercba avatar Jan 06 '18 20:01 joseferrercba

not working npm ERR! code ETARGET npm ERR! notarget No matching version found for require-from-string@^1.1.0 npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. npm ERR! notarget npm ERR! notarget It was specified as a dependency of 'cosmiconfig' npm ERR! notarget from past 4 hrs at least

shubhamchandra avatar Jan 06 '18 20:01 shubhamchandra

RE: pinkie-promise@^2.0.0 package Yup... same here... so the whole Angular 5 CLI installation process seems pretty well broken [ not to say f****d up...] for now... so I guess we have no choice but clean up the whole mess and all unwanted leftover garbage... then go out and have a beer... then hmmm naah maybe not... a bit too chilly up here... Brrrrrr...

Tameshiwari avatar Jan 06 '18 20:01 Tameshiwari

Still not working trying to install angular CLI. npm ERR! notarget No matching version found for require-from-string@^1.1.0 Hopefully they can fix this issue.

BinsGuns avatar Jan 06 '18 20:01 BinsGuns

Getting the same error here..still waiting for the fix

DGathagu avatar Jan 06 '18 20:01 DGathagu

You can use npm view require-from-string versions --json and check if version 1.1.0 is there, instead of trying to reinstall every 5 minutes. When you do eventually see 1.1.0, then we should be back on track for installing angular-cli.

patrickoliveras avatar Jan 06 '18 20:01 patrickoliveras