()
| 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 |
no test coverage detected