MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / checkNpmVersion

Method checkNpmVersion

lib/tasks/npm-task.js:107–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105 }
106
107 async checkNpmVersion() {
108 try {
109 let result = await this.npm(['--version']);
110 let version = result.stdout;
111 logger.info('npm --version: %s', version);
112
113 return { name: 'npm', version };
114 } catch (error) {
115 logger.error('npm --version failed: %s', error);
116
117 if (error.code === 'ENOENT') {
118 throw new SilentError(
119 'Ember CLI is now using the global npm, but was not able to find it.\n' +
120 'Please install npm using the instructions at https://github.com/npm/npm'
121 );
122 }
123
124 throw error;
125 }
126 }
127
128 /**
129 * This method will determine what package manager (npm or yarn) should be

Callers 2

findPackageManagerMethod · 0.95
npm-task-test.jsFile · 0.80

Calls 1

npmMethod · 0.95

Tested by

no test coverage detected