-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'vue' of undefined #69
Comments
我也是 |
首先,需要提醒你的是,你在一个已经包含了 webpack 的项目使用 VuePress 要尤为慎重,因为 VuePress 已经内置了 Webpack。比如,当你的项目中已经包含了某些 loader 的时候,npm 会默认下载最低的版本,这就可能出现问题。 恰好,VuePress 使用的 vue-loader 版本是 尝试升级 Above all, I want to remind you that you should be particularly careful about using Exactly, the Try to upgrade your |
@ZhuLiangT 你解决了吗?怎么解决的? |
将vue-loader更新到新的稳定版本就可以了 |
系统:OSX 10.13.3
node版本:v9.10.1
新建的webpack-simple项目,按照官网安装依赖之后使用npx vuepress dev docs命令构建报错
ERROR in ./node_modules/_vuepress@0.4.0@vuepress/lib/default-theme/NotFound.vue
Module build failed: TypeError: Cannot read property 'vue' of undefined
at Object.module.exports (/Users/zhuliang/idea_workspace/myPro/tesetpress1/node_modules/_vue-loader@13.7.1@vue-loader/lib/loader.js:61:18)
@ ./node_modules/_vuepress@0.4.0@vuepress/lib/app/app.js 6:0-32 47:13-21
@ ./node_modules/_vuepress@0.4.0@vuepress/lib/app/clientEntry.js
@ multi ./node_modules/_vuepress@0.4.0@vuepress/lib/app/clientEntry.js
ERROR in ./node_modules/_vuepress@0.4.0@vuepress/lib/default-theme/Layout.vue
Module build failed: TypeError: Cannot read property 'vue' of undefined
at Object.module.exports (/Users/zhuliang/idea_workspace/myPro/tesetpress1/node_modules/_vue-loader@13.7.1@vue-loader/lib/loader.js:61:18)
@ ./node_modules/_vuepress@0.4.0@vuepress/lib/app/.temp/routes.js 4:0-26 8:17-22
@ ./node_modules/_vuepress@0.4.0@vuepress/lib/app/app.js
@ ./node_modules/_vuepress@0.4.0@vuepress/lib/app/clientEntry.js
@ multi ./node_modules/_vuepress@0.4.0@vuepress/lib/app/clientEntry.js
ERROR in ./docs/README.md
Module build failed: TypeError: Cannot read property 'vue' of undefined
at Object.module.exports (/Users/zhuliang/idea_workspace/myPro/tesetpress1/node_modules/_vue-loader@13.7.1@vue-loader/lib/loader.js:61:18)
@ ./node_modules/_vuepress@0.4.0@vuepress/lib/app/.temp/routes.js 10:8-81
@ ./node_modules/_vuepress@0.4.0@vuepress/lib/app/app.js
@ ./node_modules/_vuepress@0.4.0@vuepress/lib/app/clientEntry.js
@ multi ./node_modules/_vuepress@0.4.0@vuepress/lib/app/clientEntry.js
The text was updated successfully, but these errors were encountered: