File tree 1 file changed +9
-1
lines changed
packages/@vue/cli/lib/util
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ const execa = require('execa')
5
5
const minimist = require ( 'minimist' )
6
6
const semver = require ( 'semver' )
7
7
const LRU = require ( 'lru-cache' )
8
+ const chalk = require ( 'chalk' )
8
9
9
10
const {
10
11
hasYarn,
@@ -13,6 +14,7 @@ const {
13
14
hasProjectPnpm
14
15
} = require ( '@vue/cli-shared-utils/lib/env' )
15
16
const { isOfficialPlugin, resolvePluginId } = require ( '@vue/cli-shared-utils/lib/pluginResolution' )
17
+ const { log, warn } = require ( '@vue/cli-shared-utils/lib/logger' )
16
18
17
19
const { loadOptions } = require ( '../options' )
18
20
const getPackageJson = require ( './getPackageJson' )
@@ -76,7 +78,13 @@ class PackageManager {
76
78
}
77
79
78
80
if ( ! SUPPORTED_PACKAGE_MANAGERS . includes ( this . bin ) ) {
79
- throw new Error ( `Unknown package manager: ${ this . bin } ` )
81
+ log ( )
82
+ warn (
83
+ `The package manager ${ chalk . red ( this . bin ) } is ${ chalk . red ( 'not officially supported' ) } .\n` +
84
+ `It will be treated like ${ chalk . cyan ( 'npm' ) } , but compatibility issues may occur.\n` +
85
+ `See if you can use ${ chalk . cyan ( '--registry' ) } instead.`
86
+ )
87
+ PACKAGE_MANAGER_CONFIG [ this . bin ] = PACKAGE_MANAGER_CONFIG . npm
80
88
}
81
89
}
82
90
You can’t perform that action at this time.
0 commit comments