In turn, add the following dependent on
vue add element
Vue add axios
Vue add echarts
Run the NPM run serve
Then an error:
Error: vue - loader requires @ vue/compiler - SFC to be present in the dependency tree
Error in detail the following
INFO Starting development server...
ERROR ERROR: vue - loader requires @ vue/compiler - SFC to be present in the dependency tree.
Error: the vue - loader requires @ vue/compiler - SFC to be present in the dependency tree.
At the Object. & lt; anonymous> (F: \ Work_zxz \ vue \ init_hzgh \ node_modules \ @ vue/cli - service/node_modules \ vue - loader \ dist \ index js: pleasure:)
At the Module. _compile (internal/modules/CJS/loader. Js: 805:30)
at Object.Module._extensions.. Js (internal/modules/CJS/loader. Js: 816:10)
At the Module. The load (internal/modules/CJS/loader. Js: 672:32)
The at tryModuleLoad (internal/modules/CJS/loader. Js: 612:12)
Ats Function. The Module. _load (internal/modules/CJS/loader. Js: 604:3)
At the Module. The require (internal/modules/CJS/loader. Js: 711:19)
At the require (internal/modules/CJS/helpers. Js: he)
At API. ChainWebpack. WebpackConfig (F: \ Work_zxz \ vue \ init_hzgh \ node_modules \ @ vue \ cli - service \ lib \ config \ base js: 110:16)
The at webpackChainFns. ForEach. Fn (F: \ Work_zxz \ vue \ init_hzgh \ node_modules \ @ vue \ cli - service \ lib \ service js: 236:40)
npm ERR! Code ELIFECYCLE
npm ERR! Errno 1
npm ERR! [email protected] serve: ` vue cli - service serve `
npm ERR! The Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] serve script.
npm ERR! This is probably not a problem with NPM. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C: \ Users \ \ Administrator \ AppData \ Roaming \ NPM - cache \ _logs \ 2020-08-27 T01_33_51_138Z - the debug log
Specific log log the following
0 info it worked if it ends with ok
1 the verbose cli [' C: \ \ Program Files \ \ nodejs \ \ node exe ',
1 verbose cli 'C: \ \ Program Files \ \ nodejs \ \ node_modules \ \ NPM \ \ bin \ \ NPM - cli. Js',
1 the verbose cli 'run',
1 the verbose cli 'serve']
2 the info using [email protected]
3 the info using [email protected]
4 verbose run - script [' preserve ', 'serve', 'postserve]
5 the info lifecycle [email protected] to preserve: [email protected]
6 the info lifecycle [email protected] ~ serve: [email protected]
7 verbose lifecycle [email protected] ~ serve: unsafe - perm in lifecycle true
8 verbose lifecycle [email protected] ~ serve: PATH: C: \ Users \ \ Administrator \ AppData \ Roaming \ NVM \ v11.13.0 \ node_modules/NPM/node_modules/NPM - lifecycle \ node - gyp - bin; F: \ Work_zxz \ vue \ init_hzgh \ node_modules \ bin. C: \ Windows \ system32; C: \ Windows; C: \ Windows \ System32 \ Wbem; C: \ Windows \ System32 \ WindowsPowerShell \ v1.0 \; C: \ Program Files \ TortoiseSVN \ bin. C: \ Program Files \ Microsoft SQL Server (x86) 100 \ Tools \ Binn \ \; C: \ Program Files \ Microsoft SQL Server 100 \ Tools \ Binn \ \; C: \ Program Files \ Microsoft SQL Server 100 \ DTS \ Binn \ \; C: \ Program Files \ Git \ CMD. C: \ Program Files \ Microsoft \ Web Platform Installer \; % % NVM_HOME; % % NVM_SYMLINK; C: \ Program Files \ dotnet \; C: \ Program Files \ Microsoft SQL Server 130 \ Tools \ Binn \ \; C: \ Program Files \ Microsoft SQL Server \ ODBC \ 170 \ \ Client SDK Tools \ Binn \; C: \ Users \ \ Administrator \ AppData \ Local \ Microsoft \ WindowsApps; C: \ Users \ \ Administrator \ AppData \ Roaming \ NPM; C: \ Users \ \ Administrator \ AppData \ Local \ BypassRuntm; C: \ Users \ \ Administrator \ AppData \ Roaming \ NVM. C: \ Program Files \ nodejs; D: \ \ Program Files \ Microsoft VS Code \ bin
9 verbose lifecycle [email protected] ~ serve: CWD: F: \ Work_zxz \ vue \ init_hzgh
10 silly lifecycle [email protected] ~ serve: the Args: ['/d/s/c ', 'vue - cli - service serve']
11 silly lifecycle [email protected] ~ serve: Returned: code: 1 signal: null
12 the info lifecycle [email protected] ~ serve: Failed to exec serve script
13 verbose stack Error: [email protected] serve: ` vue cli - service serve `
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. & lt; anonymous> (C: \ Users \ \ Administrator \ AppData \ Roaming \ NVM \ v11.13.0 \ node_modules/NPM/node_modules/NPM - lifecycle \ index js: 301:16)
13 verbose stack at EventEmitter. Emit (events. Js: 193:13)
13 verbose stack at ChildProcess. & lt; anonymous> (C: \ Users \ \ Administrator \ AppData \ Roaming \ NVM \ v11.13.0 \ node_modules/NPM/node_modules/NPM - lifecycle \ lib \ spawn js: 55:14)
13 verbose stack at ChildProcess. Emit (events. Js: 193:13)
13 verbose stack at maybeClose (internal/child_process. Js: 1001:16)
13 verbose stack at the Process. The ChildProcess. _handle. Onexit (internal/child_process. Js: 266:5)
14 verbose pkgid [email protected]
15 verbose CWD F: \ Work_zxz \ vue \ init_hzgh
16 verbose Windows_NT 10.0.16299
17 verbose argv "C: \ \ Program Files \ \ nodejs \ \ node exe" "C: \ \ Program Files \ \ nodejs \ \ node_modules \ \ NPM \ \ bin \ \ NPM - cli. Js" "run" "serve"
18 verbose node v11.13.0
19 verbose NPM v6.7.0
20 the error code ELIFECYCLE
21 the error errno 1
22 the error [email protected] serve: ` vue cli - service serve `
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull