Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Vue-Cli 4 Generated project Error while trying to vue add p11n #38

Open
Codermar opened this issue Oct 25, 2019 · 1 comment
Open

Vue-Cli 4 Generated project Error while trying to vue add p11n #38

Codermar opened this issue Oct 25, 2019 · 1 comment

Comments

@Codermar
Copy link

Codermar commented Oct 25, 2019

I got the errors below while trying to "vue add p11n" to a newly created project with @vue/cli 4.0.5

─▪ vue add p11n
WARN There are uncommited changes in the current repository, it's recommended to commit or stash them first.
? Still proceed? Yes

📦 Installing vue-cli-plugin-p11n...

core-js@2.6.10 postinstall /usr/local/puppeteer-platform/packages/puppeteer-ui-plugin-forms/node_modules/@babel/runtime-corejs2/node_modules/core-js
node postinstall || echo "ignore"

core-js@2.6.10 postinstall /usr/local/puppeteer-platform/packages/puppeteer-ui-plugin-forms/node_modules/@vuepress/core/node_modules/core-js
node postinstall || echo "ignore"

vuepress@1.2.0 postinstall /usr/local/puppeteer-platform/packages/puppeteer-ui-plugin-forms/node_modules/vuepress
opencollective-postinstall || true

  • vue-cli-plugin-p11n@0.4.0
    added 242 packages from 170 contributors and audited 44406 packages in 41.326s
    found 1 low severity vulnerability
    run npm audit fix to fix them, or npm audit for details
    ✔ Successfully installed plugin: vue-cli-plugin-p11n

🚀 Invoking generator for vue-cli-plugin-p11n...
⚠️ author is undefined in package.json
⠋ Running completion hooks...error: Assignment to property of function parameter 'Vue' (no-param-reassign) at src/index.js:9:3:
7 | */
8 |

9 | Vue.prototype.$add = (a, b) => a + b;
| ^
10 |
11 | /*
12 | * NOTE:

error: 'vue' should be listed in the project's dependencies, not devDependencies (import/no-extraneous-dependencies) at src/main.js:1:1:

1 | import Vue from 'vue';
| ^
2 | import App from './App.vue';
3 | import './plugin';
4 |

error: 'vue' should be listed in the project's dependencies, not devDependencies (import/no-extraneous-dependencies) at src/plugin.js:6:1:
4 | */
5 |

6 | import Vue from 'vue';
| ^
7 | import plugin from './index';
8 |
9 | Vue.use(plugin);

3 errors found.

@Codermar
Copy link
Author

Codermar commented Oct 25, 2019

Update: Moving vue to dependencies and adding eslint disable in index.js seems to make the project work. Still checking if anything else might be broken.

 // eslint-disable-next-line no-param-reassign
  Vue.prototype.$add = (a, b) => a + b;

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

No branches or pull requests

1 participant