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. Flask之静态文件处理

    静态文件的处理 推荐 from flask import Flask,render_template app = Flask(__name__,template_folder='templates', ...

  2. python工业互联网应用实战3—Django Admin列表

    Django Admin笔者使用下来可以说是Django框架的开发利器,业务model构建完成后,我们就能快速的构建一个增删查改的后台管理框架.对于大量的企业管理业务开发来说,可以快速的构建一个可发布 ...

  3. MySQL调优性能监控之show profile

    用show profile查询工具指定具体的type show profile在mysql5.7之后过时 show profile命令用于跟踪执行过的sql语句的资源消耗信息,可以帮助查看sql语句的 ...

  4. JavaFx ObservableList的使用详解

    原文地址:JavaFx ObservableList的使用详解 | Stars-One的杂货小窝 最近在研究MVVM模式,发现可以将之前写的FxRecyclerView控件改造一下,便是开始尝试,尝试 ...

  5. Azure DevOps Pipelines执行RobotFramework自动化代码

    一.Azure DevOps介绍 1.什么是 Azure DevOps? Azure DevOps其实是VSTS(Visual Studio Team Service)更名后的名字.而VSTS是TFS ...

  6. 任何Python线程执行前,必须先获得GIL锁,然后,每执行100条字节码,解释器就自动释放GIL锁,让别的线程有机会执行

    任何Python线程执行前,必须先获得GIL锁,然后,每执行100条字节码,解释器就自动释放GIL锁,让别的线程有机会执行 多线程 - 廖雪峰的官方网站 https://www.liaoxuefeng ...

  7. 阿里巴巴微服务与配置中心技术实践之道 配置推送 ConfigurationManagement ConfigDrivenAnyting

    阿里巴巴微服务与配置中心技术实践之道 原创: 坤宇 InfoQ 2018-02-08 在面向分布式的微服务系统中,如何通过更高效的配置管理方式,帮助微服务系统架构持续"无痛"的演进 ...

  8. Centos 7 安装 erlang

    https://www.cnblogs.com/swyy/p/11582309.html https://blog.csdn.net/qq_20492999/article/details/81254 ...

  9. POJ 3461__KMP算法

    [题目描述] 法国作家乔治·佩雷克(Georges Perec,1936-1982)曾经写过一本书,<敏感字母>(La disparition),全篇没有一个字母'e'.他是乌力波小组(O ...

  10. react+ant design 项目执行yarn run eject 命令后无法启动项目

    如何将内建配置全部暴露? 使用create-react-app结合antd搭建的项目中,项目目录没有该项目所有的内建配置, 1.执行yarn run eject 执行该命令后,运行项目yarn sta ...