vue-element-admin去掉使用Squire的MarkDown编辑器tui-editor并在内网打包
问题现象需要从github.com下载,在生产环境(有npm镜像,但无法直接连外网)情况下无法使用npm WARN deprecated runjs@4.4.2: This project has been renamed to 'tasksfile'. Install using 'npm install tasksfile' instead.npm WARN deprecated ...
问题现象
需要从github.com下载,在生产环境(有npm镜像,但无法直接连外网)情况下无法使用
npm WARN deprecated runjs@4.4.2: This project has been renamed to 'tasksfile'. Install using 'npm install tasksfile' instead.
npm WARN deprecated microcli@1.3.3: This project has been renamed to @pawelgalazka/cli . Install using @pawelgalazka/cli instead
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN deprecated microargs@1.1.2: This project has been renamed to @pawelgalazka/cli-args. Install using @pawelgalazka/cli-args instead
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated kleur@2.0.2: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/sohee-lee7/Squire.git
npm ERR!
npm ERR! ssh: Could not resolve hostname github.com: Name or service not known
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128
解决方案:去掉使用Squire的MarkDown编辑器tui-editor
准备:全局安装sass
1、下载sass包
这里以4.12.0版本为例
npm install时会提示地址,4.12.0版本在64位linux下链接地址如下所示:
https://github.com/sass/node-sass/releases/download/v4.12.0/linux-x64-64_binding.node
上传到服务器的/tmp目录
2、全局安装
export SASS_BINARY_PATH=/tmp/linux-x64-64_binding.node
npm cache clear --force
npm install -g node-sass@4.12.0
在vue-element-admin模板中去掉tui-editor
1、修改package.json
删除包括tui-editor的1行
2、删除tui-editor相关文件
rm src/components/MarkdownEditor/index.vue
rm src/views/components-demo/markdown.vue
vi src/router/modules/components.js 删除@/views/components-demo/markdown相关内容,如下所示:
{
path: 'markdown',
component: () => import('@/views/components-demo/markdown'),
name: 'MarkdownDemo',
meta: { title: 'Markdown' }
},
3、安装saas包
npm cache clear --force
rm -rf package-lock.json
npm install --unsafe-perm
4、运行和打包
npm run dev
npm run build:prod
更多推荐
所有评论(0)