InCuca / vuepress-pass

VuePress authentication plugin
MIT License
13 stars 1 forks source link

[vuepress] cannot resolve plugin "vuepress-pass" #6

Open andrewmkrug opened 5 years ago

andrewmkrug commented 5 years ago

In when I run the vuepress build docs I am getting an error `[vuepress] cannot resolve plugin "vuepress-pass"

I have this in the config.js

plugins: {
    'vuepress-pass': {
      url: 'url in auth0,
      redirectUri: 'url in auth0/callback',
      clientId: 'client id in auth0',
    },

Is there any other information needed to make this work?

klarkc commented 5 years ago

It's the only required information, there is authenticated and unauthenticated callback, that are optionals (I know I must doc this somewhere).

The problem is that for some reason the module is not being found, did you installed correctly (npm ls vuepress-pass)?

You can also try using this:

config.js

const Pass = require('vuepress-pass');

module.exports = {
  plugins: [[Pass, {...}]],
};
andrewmkrug commented 5 years ago

I did that and I tried instead using yarn. Same error message, I did find this as a warning in VS code using the const Pass = require

Try `npm install @types/vuepress-pass` if it exists or add a new declaration (.d.ts) file containing `declare module 'vuepress-pass';