vue3项目导入异常
1、异常提示如下:
failed TO LOAD config FROM D:\ws-projects\vite.co
nfig.js
error WHEN STARTING dev SERVER:
Error: @vitejs/PLUGIN-vue requires vue (>=3.2.13) OR @vue/compiler-sfc TO be pre
sent IN the dependency tree.
2、解决办法:
具体命令如下:
npm install vue@3.2.13 --save-dev
一般都是开发者捐赠支持的提示,打开一个github的链接之后,会显示需要打赏捐赠的信息,此时如果不想npm install --no-fund捐赠或者跳过这个提示的话,直接在后面加–NO-fund即可,
解决办法:
npm install --no-fund
npm notice created a lockfile as package-lock.json. You should commit this filenpm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules\c
okidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents
2.3.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"
)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\w
tchpack-chokidar2\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents
1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64
})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\w
bpack-dev-server\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents
1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64
})
npm WARN eslint-loader@2.2.1 requires a peer of eslint@>=1.6.0 <7.0.0 but none
s installed. You must install peer dependencies yourself.added 1603 packages from 951 contributors in 90.575s137 packages are looking for fundingrun `npm fund` for detailsD:\ws-projects\RuoYi-Vue-master\ruoyi-ui>npm fund
ruoyi@3.8.6
+-- https://github.com/chalk/chalk?sponsor=1
| `-- chalk@4.1.0
+-- https://opencollective.com/webpack
| `-- compression-webpack-plugin@5.0.2, sass-loader@10.1.1, webpack@4.46.0, sch
ma-utils@2.7.1, terser-webpack-plugin@2.3.8, copy-webpack-plugin@5.1.2, css-loa
er@3.6.0, schema-utils@3.3.0
+-- https://opencollective.com/core-js
| `-- core-js@3.25.3, core-js-compat@3.32.1
+-- https://opencollective.com/eslint
| `-- eslint@7.15.0
+-- https://opencollective.com/lint-staged
| `-- lint-staged@10.5.3
+-- https://github.com/sponsors/sindresorhus
| `-- screenfull@5.0.2, camelcase@6.3.0, html-tags@3.3.1, cli-spinners@2.9.0, d
faults@1.0.4, parse-json@5.2.0, make-dir@3.1.0, p-limit@2.3.0, ansi-escapes@4.3
2, figures@3.2.0, type-fest@0.21.3, onetime@5.1.2, is-docker@2.2.1, get-stream@
.2.0, is-stream@2.0.1, p-map@4.0.0, globals@12.4.0, import-fresh@3.3.0, strip-j
on-comments@3.1.1, cli-truncate@2.1.0, log-symbols@4.1.0, is-unicode-supported@
.1.0, log-update@4.0.0
+-- https://opencollective.com/babel
| `-- @babel/core@7.22.11
+-- https://opencollective.com/browserslist
| `-- browserslist@4.21.10, caniuse-lite@1.0.30001525, update-browserslist-db@1
0.11
+-- https://tidelift.com/funding/github/npm/browserslist
| `-- browserslist@4.21.10, update-browserslist-db@1.0.11
+-- https://github.com/sponsors/ai
| `-- browserslist@4.21.10, caniuse-lite@1.0.30001525, update-browserslist-db@1
0.11
+-- https://tidelift.com/funding/github/npm/caniuse-lite
| `-- caniuse-lite@1.0.30001525
+-- https://github.com/sponsors/ljharb
| `-- resolve@1.22.4, is-core-module@2.13.0, supports-preserve-symlinks-flag@1.
.0, shell-quote@1.8.1, minimist@1.2.8, qs@6.11.2, side-channel@1.0.4, call-bind
1.0.2, get-intrinsic@1.2.1, object-inspect@1.12.3, has-proto@1.0.1, has-symbols
1.0.3, object.values@1.1.7, util.promisify@1.0.1, define-properties@1.2.0, es-a
stract@1.22.1, has-property-descriptors@1.0.0, array-buffer-byte-length@1.0.0,
rraybuffer.prototype.slice@1.0.1, available-typed-arrays@1.0.5, es-to-primitive
1.2.1, function.prototype.name@1.1.6, get-symbol-description@1.0.0, globalthis@
.0.3, gopd@1.0.1, is-array-buffer@3.0.2, is-callable@1.2.7, is-negative-zero@2.
.2, is-regex@1.1.4, is-shared-array-buffer@1.0.2, is-string@1.0.7, is-typed-arr
y@1.1.12, is-weakref@1.0.2, object.assign@4.1.4, regexp.prototype.flags@1.5.0,
afe-array-concat@1.0.0, safe-regex-test@1.0.0, string.prototype.trim@1.2.7, str
ng.prototype.trimend@1.0.6, string.prototype.trimstart@1.0.6, typed-array-byte-
ength@1.0.0, typed-array-byte-offset@1.0.0, typed-array-length@1.0.4, unbox-pri
itive@1.0.2, which-typed-array@1.1.11, has-tostringtag@1.0.0, is-date-object@1.
.5, is-symbol@1.0.4, functions-have-names@1.2.3, has-bigints@1.0.2, which-boxed
primitive@1.0.2, is-bigint@1.0.4, is-boolean-object@1.1.2, is-number-object@1.0
7, object.getownpropertydescriptors@2.1.7, array.prototype.reduce@1.0.6, qs@6.1
.0, deep-equal@1.1.1, is-arguments@1.1.1, object-is@1.1.5, traverse@0.6.7
+-- https://github.com/sponsors/feross
| `-- safe-buffer@5.2.1, base64-js@1.5.1, ieee754@1.2.1, arch@2.2.0
+-- https://www.patreon.com/feross
| `-- safe-buffer@5.2.1, base64-js@1.5.1, ieee754@1.2.1, arch@2.2.0
+-- https://feross.org/support
| `-- safe-buffer@5.2.1, base64-js@1.5.1, ieee754@1.2.1, arch@2.2.0
+-- https://github.com/sponsors/epoberezkin
| `-- ajv@6.12.6
+-- https://github.com/avajs/find-cache-dir?sponsor=1
| `-- find-cache-dir@3.3.2
+-- https://github.com/sponsors/isaacs
| `-- glob@7.2.3, rimraf@3.0.2
+-- https://paulmillr.com/funding/
| `-- chokidar@3.5.3, async-each@1.0.6
+-- https://github.com/sponsors/jonschlinkert
| `-- picomatch@2.3.1
+-- https://tidelift.com/funding/github/npm/autoprefixer
| `-- autoprefixer@9.8.8
+-- https://opencollective.com/postcss/
| `-- postcss@7.0.39, postcss-load-config@2.1.2
+-- https://github.com/sponsors/wooorm
| `-- vendors@1.0.4
+-- https://github.com/sponsors/fb55
| `-- css-what@3.4.2, domelementtype@2.3.0, htmlparser2@6.1.0, css-select@4.3.0css-what@6.1.0
+-- https://github.com/fb55/entities?sponsor=1
| `-- entities@2.2.0
+-- https://github.com/chalk/ansi-styles?sponsor=1
| `-- ansi-styles@4.3.0
+-- https://github.com/prettier/prettier?sponsor=1
| `-- prettier@2.8.8
+-- https://github.com/chalk/wrap-ansi?sponsor=1
| `-- wrap-ansi@7.0.0
+-- https://github.com/fb55/htmlparser2?sponsor=1
| `-- htmlparser2@6.1.0
+-- https://github.com/fb55/domhandler?sponsor=1
| `-- domhandler@4.3.1
+-- https://github.com/fb55/domutils?sponsor=1
| `-- domutils@2.8.0
+-- https://github.com/cheeriojs/dom-serializer?sponsor=1
| `-- dom-serializer@1.4.1
+-- https://github.com/fb55/nth-check?sponsor=1
| `-- nth-check@2.1.1
+-- https://tidelift.com/funding/github/npm/loglevel
| `-- loglevel@1.8.1
+-- https://tidelift.com/funding/github/npm/sockjs-client
| `-- sockjs-client@1.6.1
+-- https://github.com/sponsors/RubenVerborgh
| `-- follow-redirects@1.15.2
+-- https://github.com/sponsors/mysticatea
| `-- eslint-utils@2.1.0, regexpp@3.2.0, vue-eslint-parser@7.11.0
+-- https://github.com/sindresorhus/execa?sponsor=1
| `-- execa@4.1.0
`-- https://github.com/chalk/slice-ansi?sponsor=1`-- slice-ansi@4.0.0
D:\ws-projects\RuoYi-Vue-master\ruoyi-ui>npm install --no-fund
npm WARN eslint-loader@2.2.1 requires a peer of eslint@>=1.6.0 <7.0.0 but none i
s installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.3 (node_modules\fse
vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
2.3.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\wa
tchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"
})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\we
bpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"
})up to date in 10.897sD:\ws-projects\RuoYi-Vue-master\ruoyi-ui>