鹰潭开发前端大屏幕环境搭建

Vue.js的安装:http://t.csdnimg.cn/he9vw(具体版本参考如下)


WebStorm的安装:http://t.csdnimg.cn/xuu5r

打开项目

打开终端输入npm i安装环境



npm fund完整内容如下

PS F:\wisdom-screen 2\wisdom-screen> npm fund

wisdom-screen-center@2.5.1

+-- https://opencollective.com/core-js

| `-- core-js@3.6.5, core-js-compat@3.37.1

+-- https://opencollective.com/eslint

| `-- eslint@6.7.2

+-- https://github.com/sponsors/sindresorhus

| `-- screenfull@5.2.0, camelcase@6.3.0, html-tags@3.3.1, parse-json@5.2.0, cli-spinners@2.9.2, defaults@1.0.4, make-dir@3

.1.0, p-limit@2.3.0, component-emitter@1.3.1, binary-extensions@2.3.0, ansi-escapes@4.3.2, figures@3.2.0, type-fest@0.21.3

, onetime@5.1.2, array-equal@1.0.2, string-width@5.1.2, is-docker@2.2.1, get-stream@5.2.0, is-stream@2.0.1, is-finite@1.1.

0, globals@12.4.0, import-fresh@3.3.0, strip-json-comments@3.1.1, cli-truncate@2.1.0, log-symbols@4.1.0, log-update@4.0.0,

p-map@4.0.0, is-unicode-supported@0.1.0

+-- https://opencollective.com/babel

| `-- @babel/core@7.24.5

+-- https://opencollective.com/webpack

| `-- webpack@4.47.0, schema-utils@2.7.1, terser-webpack-plugin@2.3.8, copy-webpack-plugin@5.1.2, css-loader@3.6.0        

+-- https://opencollective.com/browserslist

| `-- browserslist@4.23.0, caniuse-lite@1.0.30001620, update-browserslist-db@1.0.16

+-- https://tidelift.com/funding/github/npm/browserslist

| `-- browserslist@4.23.0, update-browserslist-db@1.0.16

+-- https://github.com/sponsors/ai

| `-- browserslist@4.23.0, caniuse-lite@1.0.30001620, update-browserslist-db@1.0.16, postcss@8.4.38, nanoid@3.3.7

+-- https://tidelift.com/funding/github/npm/caniuse-lite

| `-- caniuse-lite@1.0.30001620

+-- https://github.com/sponsors/ljharb

| `-- resolve@1.22.8, is-core-module@2.13.1, supports-preserve-symlinks-flag@1.0.0, function-bind@1.1.2, shell-quote@1.8.1

, minimist@1.2.8, object.assign@4.1.5, call-bind@1.0.7, define-properties@1.2.1, has-symbols@1.0.3, get-intrinsic@1.2.4, h

as-proto@1.0.3, define-data-property@1.1.4, gopd@1.0.1, has-property-descriptors@1.0.2, qs@6.12.1, side-channel@1.0.6, obj

ect-inspect@1.13.1, util.promisify@1.1.2, object.getownpropertydescriptors@2.1.8, safe-array-concat@1.1.2, is-callable@1.2

.7, array.prototype.reduce@1.0.7, es-abstract@1.23.3, is-string@1.0.7, has-tostringtag@1.0.2, array-buffer-byte-length@1.0

.1, arraybuffer.prototype.slice@1.0.3, available-typed-arrays@1.0.7, data-view-buffer@1.0.1, data-view-byte-length@1.0.1, 

data-view-byte-offset@1.0.0, es-to-primitive@1.2.1, function.prototype.name@1.1.6, get-symbol-description@1.0.2, globalthi

s@1.0.4, is-array-buffer@3.0.4, is-data-view@1.0.1, is-negative-zero@2.0.3, is-regex@1.1.4, is-shared-array-buffer@1.0.3, 

is-typed-array@1.1.13, is-weakref@1.0.2, regexp.prototype.flags@1.5.2, safe-regex-test@1.0.3, string.prototype.trim@1.2.9,

string.prototype.trimend@1.0.8, string.prototype.trimstart@1.0.8, typed-array-byte-length@1.0.1, typed-array-byte-offset@

1.0.2, typed-array-length@1.0.6, unbox-primitive@1.0.2, which-typed-array@1.1.15, is-date-object@1.0.5, is-symbol@1.0.4, f

unctions-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-nu

mber-object@1.0.7, qs@6.11.0, deep-equal@1.1.2, is-arguments@1.1.1, object-is@1.1.6, traverse@0.6.9, typedarray.prototype.

slice@1.0.3, object.values@1.2.0, util.promisify@1.0.1

+-- https://opencollective.com/postcss/

| `-- postcss@8.4.38, postcss@7.0.39, postcss-load-config@2.1.2

+-- https://tidelift.com/funding/github/npm/postcss

| `-- postcss@8.4.38

+-- https://github.com/fb55/entities?sponsor=1

| `-- entities@4.5.0, entities@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/feross

| `-- safe-buffer@5.2.1, base64-js@1.5.1, ieee754@1.2.1, arch@2.2.0, buffer@6.0.3

+-- https://www.patreon.com/feross

| `-- safe-buffer@5.2.1, base64-js@1.5.1, ieee754@1.2.1, arch@2.2.0, buffer@6.0.3

+-- https://feross.org/support

| `-- safe-buffer@5.2.1, base64-js@1.5.1, ieee754@1.2.1, arch@2.2.0, buffer@6.0.3

+-- https://github.com/sponsors/isaacs

| `-- glob@7.2.3, glob@10.3.16, minimatch@9.0.1, foreground-child@3.1.1, jackspeak@3.1.2, minimatch@9.0.4, path-scurry@1.1

1.1, signal-exit@4.1.0, glob@7.1.7

+-- https://paulmillr.com/funding/

| `-- chokidar@3.6.0, async-each@1.0.6

+-- https://github.com/sponsors/jonschlinkert

| `-- picomatch@2.3.1, picomatch@4.0.2

+-- https://github.com/chalk/chalk?sponsor=1

| `-- chalk@4.1.2

+-- https://github.com/chalk/ansi-styles?sponsor=1

| `-- ansi-styles@4.3.0, ansi-styles@6.2.1

+-- https://github.com/chalk/strip-ansi?sponsor=1

| `-- strip-ansi@7.1.0

+-- https://github.com/chalk/wrap-ansi?sponsor=1

| `-- wrap-ansi@8.1.0, wrap-ansi@7.0.0

+-- https://github.com/chalk/ansi-regex?sponsor=1

| `-- ansi-regex@6.0.1

+-- https://tidelift.com/funding/github/npm/autoprefixer

| `-- autoprefixer@9.8.8

+-- https://github.com/sponsors/wooorm

| `-- vendors@1.0.4

+-- https://github.com/prettier/prettier?sponsor=1

| `-- prettier@2.8.8

+-- https://tidelift.com/funding/github/npm/loglevel

| `-- loglevel@1.9.1

+-- https://tidelift.com/funding/github/npm/sockjs-client

| `-- sockjs-client@1.6.1

+-- https://github.com/sponsors/RubenVerborgh

| `-- follow-redirects@1.15.6

+-- https://github.com/sponsors/mysticatea

| `-- vue-eslint-parser@7.11.0

+-- https://github.com/fb55/htmlparser2?sponsor=1

| `-- htmlparser2@6.1.0

+-- https://github.com/sponsors/fb55

| `-- htmlparser2@6.1.0, css-select@4.3.0, domelementtype@2.3.0, css-what@6.1.0, css-what@3.4.2

+-- 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://opencollective.com/lint-staged

| `-- lint-staged@10.5.4

+-- https://github.com/sindresorhus/execa?sponsor=1

| `-- execa@4.1.0

`-- https://github.com/chalk/slice-ansi?sponsor=1

  `-- slice-ansi@4.0.0


在request.js文件里修改token


安装完成后输入npm run dev启动就可以了


npm install 时候,报错npm ERR! cb() never called! npm ERR! This is an error with npm itself.Please report this error at:

错误详情如下: 

这个问题我试了好几天,找了很多的方法,但是都没有成功,最后结合了很多方法,将其解决了

在这里记录一下自己的解决方法,方便以后来解决此问题:


二·分析原因

这个问题在网上找了很多的方法,然后去尝试了,之后在自己看来,就是自己的npm 版本可能过低,或者下载依赖的时候,网速过慢,一直卡着不动,最后报错,这些只是自己认为的


三·解决方法

1. 找到下载依赖出错的项目,然后删除下载好的 nodel_module 文件夹及文件夹下面已经下载好的依赖包

2. 如果有 package.lock.json 文件,那也需要一起删除,如果没有这个就不用删除

3. 升级 自己本机的npm ,在cmd窗口中输入命令:

 npm install npm -g

此处同时执行下面的命令行(也可以不执行):

npm install  -g webpack

4. 清空缓存,在项目的终端窗口执行命令

npm cache clean --force

结果如下:

5. 重新下载依赖,

执行命令:

npm install

如果此命令失败,那就重复上面的步骤,然后使用cnpm 来安装

安装cnpm:

npm install -g cnpm --registry=https://registry.npm.taobao.org

然后执行cnpm 来下载依赖:

cnpm install

结果如下:



此处虽然有些报红的地方,但是没有出错,是可以的,之后就可以启动项目

npm run dev



MES
郭昊杰 2024年5月21日
分析这篇文章

存档
登录 留下评论
鹰潭开发java项目环境搭建