vue-cli-plugin-p11n
vue-cli-plugin-p11n copied to clipboard
Vue-Cli 4 Generated project Error while trying to vue add p11n
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...
[email protected] postinstall /usr/local/puppeteer-platform/packages/puppeteer-ui-plugin-forms/node_modules/@babel/runtime-corejs2/node_modules/core-js node postinstall || echo "ignore"
[email protected] postinstall /usr/local/puppeteer-platform/packages/puppeteer-ui-plugin-forms/node_modules/@vuepress/core/node_modules/core-js node postinstall || echo "ignore"
[email protected] postinstall /usr/local/puppeteer-platform/packages/puppeteer-ui-plugin-forms/node_modules/vuepress opencollective-postinstall || true
- [email protected]
added 242 packages from 170 contributors and audited 44406 packages in 41.326s
found 1 low severity vulnerability
run
npm audit fixto fix them, ornpm auditfor 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.
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;