question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot resolve plugin "@vuepress/plugin-google-analytics" / "@vuepress/google-analytics"

See original GitHub issue
  • I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

Create brand new vuepress site and install @vuepress/google-analytics.

What is expected?

Google analytics code to be added to the output when building for production.

What is actually happening?

Warning is displayed during the build process

warning [vuepress] cannot resolve plugin "@vuepress/google-analytics"

Other relevant information

I also tried to change the config key to @vuepress/plugin-google-analytics as this is the name of the plugin in package.json but nothing changed.

My config.js file has the following code:

module.exports = {
    plugins: [
        ['@vuepress/plugin-google-analytics', {
            ga: 'UA-29469126-4'
        }]
    ]
};
  • My VuePress version is lower and euqal than 1.0.0-alpha.47:

    • VuePress version: vuepress@1.0.0-alpha.48
    • OS: macOS Mojave 10.14.4
    • Node.js version: v8.15.0
    • Browser version: Chrome 74
    • Is this a global or local install? Global
    • Which package manager did you use for the install? Yarn
    • Does this issue occur when all plugins are disabled? Yes
  • My VuePress version is higher than 1.0.0-alpha.47, the following is the output of vuepress info in my VuePress project:

Environment Info:

  System:
    OS: macOS 10.14.4
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
  Binaries:
    Node: 8.15.0 - /usr/local/opt/node@8/bin/node
    Yarn: 1.15.2 - /usr/local/bin/yarn
    npm: 6.4.1 - /usr/local/opt/node@8/bin/npm
  Browsers:
    Chrome: 74.0.3729.157
    Firefox: 64.0.2
    Safari: 12.1
  npmPackages:
    @vuepress/core: Not Found
    @vuepress/theme-default: Not Found
    vuepress: Not Found
  npmGlobalPackages:
    vuepress: Not Found

npx vuepress info actually resulted in the following error:

Usage: vuepress <command> [options]

Options:
  -V, --version                output the version number
  -h, --help                   output usage information

Commands:
  dev [options] [targetDir]    start development server
  build [options] [targetDir]  build dir as static site
  eject [targetDir]            copy the default theme into .vuepress/theme for customization.

  Run vuepress <command> --help for detailed usage of given command.

  Unknown command info.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
harlleycommented, Jun 2, 2019

I’ve just fixed by including "vuepress": "^1.0.0-alpha.48" on my package.json file and running yarn install

2reactions
mboo2005commented, Jun 27, 2019

It seems that this issue doesn’t exist, please use the latest version of vuepress.

@ulivz Wast me one night to make it work!! Cannot resolve plugin ** when Vuepress is installed globally. You should put Vuepress locally.

Environment Info: [With question] npmPackages: @vuepress/core: Not Found @vuepress/theme-default: Not Found vuepress: Not Found npmGlobalPackages: vuepress: 1.0.2 Environment Info: [OK] npmPackages: @vuepress/core: 1.0.2 @vuepress/theme-default: 1.0.2 vuepress: ^1.0.2 => 1.0.2 npmGlobalPackages: vuepress: 1.0.2

It’s the solution: I’ve just fixed by including “vuepress”: “^1.0.0-alpha.48” on my package.json file and running yarn install

Read more comments on GitHub >

github_iconTop Results From Across the Web

@vuepress/plugin-google-analytics - npm
google-analytics plugin for vuepress. Latest version: 1.9.7, last published: a year ago. Start using @vuepress/plugin-google-analytics in ...
Read more >
Google Analytics doesn't work in my vuepress project
The declaration of plugin is wrong. You have two options to declare the plugin: Babel Style or Object Style. Babel style:
Read more >
Cannot resolve plugin org.apache.maven.plugins
I have IntelliJ 2020.3 and Maven 3.6.3 and java 1.8 jdk. When trying to build Java project with Maven, I' ve got Cannot...
Read more >
@vuepress/plugin-google-analytics | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Cannot resolve plugin org.apache.maven.plugins ... - YouTube
Welcome to my YouTube channel for more Videos every week.If this video helped you out please consider leaving a like & commenting down...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found