vuepress & package.json lock version

npm 锁版 bug

npm lock version

holy shit

{
"name": "app",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs",
"test:unit": "vue-cli-service test:unit",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "3.6.5",
"vue": "2.6.11",
"element-ui": "2.14.1",
"async-validator": "1.11.5",
"vue-router": "3.2.0",
"vuex": "3.4.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "4.5.0",
"@vue/cli-plugin-eslint": "4.5.0",
"@vue/cli-plugin-router": "4.5.0",
"@vue/cli-plugin-unit-jest": "4.5.0",
"@vue/cli-plugin-vuex": "4.5.0",
"@vue/cli-service": "4.5.0",
"@vue/eslint-config-prettier": "6.0.0",
"@vue/test-utils": "1.0.3",
"babel-eslint": "10.1.0",
"eslint": "6.7.2",
"eslint-plugin-prettier": "3.1.3",
"eslint-plugin-vue": "6.2.2",
"lint-staged": "9.5.0",
"node-sass": "4.12.0",
"prettier": "1.19.1",
"sass-loader": "8.0.2",
"vue-template-compiler": "2.6.11",
"vuepress": "1.8.0"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,jsx,vue}": [
"vue-cli-service lint",
"git add"
]
}
}
yarn run docs:dev
yarn run v1.22.10
$ vuepress dev docs
/Users/xgqfrms/Documents/gitlab-projects/vuepress-docs/app/node_modules/vue-server-renderer/index.js:8
throw new Error(
^ Error: Vue packages version mismatch: - vue@2.6.11
- vue-server-renderer@2.6.12 This may cause things to work incorrectly. Make sure to use the same version for both. at Object.<anonymous> (/Users/xgqfrms/Documents/gitlab-projects/vuepress-docs/app/node_modules/vue-server-renderer/index.js:8:9)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/Users/xgqfrms/Documents/gitlab-projects/vuepress-docs/app/node_modules/@vuepress/core/lib/node/build/index.js:11:34)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

default OK

"element-ui": "^2.14.1", & "async-validator": "1.11.5",


{
"name": "app",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs",
"test:unit": "vue-cli-service test:unit",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.6.5",
"vue": "^2.6.11",
"element-ui": "^2.14.1",
"async-validator": "1.11.5",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-unit-jest": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/test-utils": "^1.0.3",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^6.2.2",
"lint-staged": "^9.5.0",
"node-sass": "^4.12.0",
"prettier": "^1.19.1",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11",
"vuepress": "^1.8.0"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,jsx,vue}": [
"vue-cli-service lint",
"git add"
]
}
}

element-ui

$ npx vuepress info

Environment Info:

  System:
OS: macOS 10.15.7
CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
Binaries:
Node: 10.16.3 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Browsers:
Chrome: Not Found
Edge: 87.0.664.60
Firefox: 84.0
Safari: 14.0.2
npmPackages:
@vuepress/core: 1.8.0
@vuepress/theme-default: 1.8.0
vuepress: ^1.8.0 => 1.8.0
npmGlobalPackages:
vuepress: Not Found

version conflict bug ???

  1. unlock version

http://localhost:8080/

[HMR] Waiting for update signal from WDS...
GlobalLayout.vue:1 Uncaught Error: Module build failed (from ./node_modules/vue-loader/lib/index.js):
TypeError: Cannot read property 'parseComponent' of undefined
at parse (:8080/Users/xgqfrms/Documents/gitlab-projects/dap-ui/node_modules/@vue/component-compiler-utils/dist/parse.js:15)
at Object.module.exports (:8080/Users/xgqfrms/Documents/gitlab-projects/dap-ui/node_modules/vue-loader/lib/index.js:67)
at eval (GlobalLayout.vue:1)
at Object../node_modules/@vuepress/core/lib/client/components/GlobalLayout.vue (app.js:2485)
at __webpack_require__ (app.js:833)
at fn (app.js:130)
at eval (routes.js?fc18:1)
at Module../node_modules/@vuepress/core/.temp/internal/routes.js (app.js:2379)
at __webpack_require__ (app.js:833)
at fn (app.js:130)
at eval (app.js:21)
at Module../node_modules/@vuepress/core/lib/client/app.js (app.js:2426)
vue.runtime.esm.js?2b0e:8440 You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
client?cae4:150 [WDS] Errors while compiling. Reload prevented.
errors @ client?cae4:150
client?cae4:159 ./node_modules/@vuepress/theme-default/global-components/CodeGroup.vue
Module Error (from ./node_modules/vue-loader/lib/index.js): Vue packages version mismatch: - vue@2.6.12 (/Users/xgqfrms/Documents/gitlab-projects/dap-ui/node_modules/vue/dist/vue.runtime.common.js)
- vue-template-compiler@2.6.11 (/Users/xgqfrms/Documents/gitlab-projects/dap-ui/node_modules/vue-template-compiler/package.json) This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader@>=10.0, simply update vue-template-compiler.
If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
  1. lock version

  1. add yarn add async-validator@1.11.5

https://github.com/vuejs/vuepress/issues/2275#issuecomment-760187485

refs



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


vuepress & package.json lock version的更多相关文章

  1. package.json相关疑惑总结

    语义版本控制(node-semver) X.Y.Z,主要版本X,次要版本Y,补丁Z X:代表一个破坏兼容性的大变化: Y:表示不会破坏任何内容的新功能: Z:表示不会破坏任何内容的错误修复: pack ...

  2. package.json详解

    1.概念 Node.js项目遵循模块化的架构,当我们创建了一个Node.js项目,意味着创建了一个模块,这个模块的描述文件,被称为package.json 亦即:模块的描述文件 = package.j ...

  3. npm package.json属性详解

    概述 本文档是自己看官方文档的理解+翻译,内容是package.json配置里边的属性含义.package.json必须是一个严格的json文件,而不仅仅是js里边的一个对象.其中很多属性可以通过np ...

  4. NodeJS中 package.json各属性分析

    package.json 中包含各种所需模块以及项目的配置信息(名称.版本.许可证等)meta 信息. Name:它属于必须字段,在package.json中最重要的就是name和version字段, ...

  5. package.json for npm中依赖外部组件时常用的版本符号含义

    package.json中会有dependencies定义了项目依赖的外部组件,这些外部组件的依赖都是带有版本符号以表示被依赖组件的版本范围. { "dependencies" : ...

  6. nwjs 配置文件package.json 转载

    配置文件package.json nw在启动应用程序时,首先要读取package.json文件,初始化基本属性,下面我们看看package.json的完整参数.每个参数配置都标有注释. { /**指定 ...

  7. npm中package.json详解

    通常我们使用npm init命令来创建一个npm程序时,会自动生成一个package.json文件.package.json文件会描述这个NPM包的所有相关信息,包括作者.简介.包依赖.构建等信息,格 ...

  8. NodeJS中 package.json 解析

    package.json 中包含各种所需模块以及项目的配置信息(名称.版本.许可证等)meta 信息. 包含可配置项 name 名称 应用描述 description 版本号 version 应用的配 ...

  9. 初学Node(二)package.json文件

    package.json简介 package.json在Node项目中用于描述项目的一些基本信息,以及依赖的配置,一般每一个Node项目的根目录下都有一个package.json文件. 在项目的根目录 ...

随机推荐

  1. Spring-01-事务

    Spring事务机制 spring事务机制最重要的两个配置项,隔离级别和传播特性. 1. 隔离级别 隔离级别针对高并发问题导致的数据库丢失更新问题 1.1 数据库的4大基本特征 原子性(Atomic) ...

  2. ADB 基本命令

    ADB很强大,记住一些ADB命令有助于提高工作效率. 获取序列号: adb get-serialno 查看连接计算机的设备: adb devices 重启机器: adb reboot 重启到bootl ...

  3. 研发过程及工具支撑 DevOps 工具链集成

    https://mp.weixin.qq.com/s/NYm63nkCymIV3DbL4O01dg 腾讯重新定义敏捷 |Q推荐 小智 InfoQ 2020-09-03 敏捷开发奠基人 Robert C ...

  4. 1.4.1 对象与JSON转化 1.4.2 JSON与List集合转化 1.1.1 获取json中的属性 day10-05

    1.1.1 对象与JSON转化 @Test public void toJSON() throws IOException{ Jedis jedis = new Jedis("192.168 ...

  5. 理解 async/await以及对Generator的优势

    async await 是用来解决异步的,async函数是Generator函数的语法糖使用关键字async来表示,在函数内部使用 await 来表示异步async函数返回一个 Promise 对象, ...

  6. CF912A

    题意 你手里有 A 个黄水晶和 B 个蓝水晶,其中两个黄水晶可以造一个黄水晶球,三个蓝水晶可以造一个蓝水晶球,一黄一蓝两个水晶可以造一个绿水晶球. 现在你需要 x 个黄水晶球,y 个绿水晶球,z 个蓝 ...

  7. 请你尽量全面的说一个对象在 JVM 内存中的结构?

    从 Java 14 开始,Project Valhala引入了 Value Type(或者称为 inline type),参考: Valhalla: https://openjdk.java.net/ ...

  8. Spark高级数据分析——纽约出租车轨迹的空间和时间数据分析

    Spark高级数据分析--纽约出租车轨迹的空间和时间数据分析 一.地理空间分析: 二.pom.xml 原文地址:https://www.jianshu.com/p/eb6f3e0c09b5 作者:II ...

  9. CentOS 7 使用pyenv安装python3.6

    安装pyenv 1.安装git yum install -y git 2.安装pyenv curl -L https://raw.githubusercontent.com/yyuu/pyenv-in ...

  10. 压缩文件 .zip.001 .zip.002合并

    可以把名字特别长的命名为1  这样简单些 copy /B 1.zip.001+1.zip.002 1.zip