Skip to content
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

Google Analytics Plugin Build Error #1126

Closed
1 task done
limdongjin opened this issue Dec 21, 2018 · 2 comments
Closed
1 task done

Google Analytics Plugin Build Error #1126

limdongjin opened this issue Dec 21, 2018 · 2 comments

Comments

@limdongjin
Copy link

  • I confirm that this is a issue rather than a question.

Bug report

Version

1.0.0-alpha.30

Steps to reproduce

package.json

 {
   "dependencies": {
     "@vuepress/plugin-google-analytics": "^1.0.0-alpha.0"
   }
 }

.vuepress/config.js

// .vuepress/config.js
module.exports = {
    title: "Google Analytics Build Error",
    description: "foo",
    plugins: [
       ['@vuepress/google-analytics',{
            ga: 'UA-xxxxxxx'
        }]
    ]
}

README.md

---
home: true
---
# HOME READMD

Run vuepress build

Rendering page: /ReferenceError: window is not defined
    at inject (server-bundle.js:4080:8)
    at server-bundle.js:4556:9
    at Array.forEach (<anonymous>)
    at createApp (server-bundle.js:4554:19)
    at module.exports.__webpack_exports__.default (server-bundle.js:4594:22)
    at new Promise (<anonymous>)
    at module.exports.__webpack_exports__.default (server-bundle.js:4593:10)
    at /Users/imdongjin/.config/yarn/global/node_modules/vue-server-renderer/build.js:8456:15
    at new Promise (<anonymous>)
    at /Users/imdongjin/.config/yarn/global/node_modules/vue-server-renderer/build.js:8418:14
    at Object.renderToString (/Users/imdongjin/.config/yarn/global/node_modules/vue-server-renderer/build.js:8594:9)
    at renderPage (/Users/imdongjin/.config/yarn/global/node_modules/@vuepress/core/lib/build.js:151:29)
    at build (/Users/imdongjin/.config/yarn/global/node_modules/@vuepress/core/lib/build.js:76:26)

Other relevant information

  • Your OS: Mac 10.14
  • Node.js version: 10.6.0
  • plugin-google-analytics: 1.0.0-alpha.0
  • Is this a global or local install? global
  • Which package manager did you use for the install? yarn
@limdongjin limdongjin changed the title Google Analytics Plugin Cause Build Error Google Analytics Plugin Build Error Dec 21, 2018
@mAKEkr
Copy link
Contributor

mAKEkr commented Dec 21, 2018

this error has solved on latest plugin version. fix your package.json and you can try to build command in latest version of this plugin. i recommended to set plugin version is same to core.

@ulivz
Copy link
Member

ulivz commented Dec 23, 2018

As mentioned above, please update version of your GA plugin to 1.0.0-alpha.30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants