vue-cli-plugin-browser-extension
vue-cli-plugin-browser-extension copied to clipboard
TypeError: Cannot read properties of undefined (reading 'ignore')
Started a fresh vue3 project.
Installed the plugin using vue add browser-extension
Then I ran the serve script which is vue-cli-service build --mode development --watch
I also tried vue-cli-service build
as well withoud the additional flags. But got the same error.
But I got the following error.
TypeError: Cannot read properties of undefined (reading 'ignore')
at D:\office\projects\onetouch\otb-browser-ext\otb-chrome-vue\extension\node_modules\vue-cli-plugin-browser-extension\index.js:129:20
at Object.tap (D:\office\projects\onetouch\otb-browser-ext\otb-chrome-vue\extension\node_modules\webpack-chain\src\Plugin.js:30:24)
at D:\office\projects\onetouch\otb-browser-ext\otb-chrome-vue\extension\node_modules\vue-cli-plugin-browser-extension\index.js:128:36
at D:\office\projects\onetouch\otb-browser-ext\otb-chrome-vue\extension\node_modules\@vue\cli-service\lib\Service.js:268:40
at Array.forEach (<anonymous>)
at Service.resolveChainableWebpackConfig (D:\office\projects\onetouch\otb-browser-ext\otb-chrome-vue\extension\node_modules\@vue\cli-service\lib\Service.js:268:26)
at PluginAPI.resolveChainableWebpackConfig (D:\office\projects\onetouch\otb-browser-ext\otb-chrome-vue\extension\node_modules\@vue\cli-service\lib\PluginAPI.js:145:25)
at module.exports (D:\office\projects\onetouch\otb-browser-ext\otb-chrome-vue\extension\node_modules\@vue\cli-service\lib\commands\build\resolveAppConfig.js:9:22)
at build (D:\office\projects\onetouch\otb-browser-ext\otb-chrome-vue\extension\node_modules\@vue\cli-service\lib\commands\build\index.js:147:50)
at D:\office\projects\onetouch\otb-browser-ext\otb-chrome-vue\extension\node_modules\@vue\cli-service\lib\commands\build\index.js:69:13
at Service.run (D:\office\projects\onetouch\otb-browser-ext\otb-chrome-vue\extension\node_modules\@vue\cli-service\lib\Service.js:262:12)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
error Command failed with exit code 1.
Expected behavior Build the project without any errors
Temporary solution
Change the node_modules/vue-cli-plugin-browser-extension/index.js line 129
from
args[0][0].ignore.push('browser-extension.html')
to
args[0][0]?.ignore.push('browser-extension.html')
Name | Version |
---|---|
vue-cli-plugin-browser-extension | 0.25.2 |
Operating System | Windows |
Node | 16.13.0 |
NPM/Yarn | yarn |
vue-cli | 5.0.1 |
Facing the same error on Mac M1.
Same here on Manjaro
This issue is tracked here. #126
one way to fix this is how @madumal7 mentioned or comment the line . But by doing this it'll still throwing error. this project is not the great way to go , when it comes to manifest 3
Same error. This problem blocks our development. How can we use standard webpack code to achieve similar results?
Replacing with this in package.json solved the issue
"vue-cli-plugin-browser-extension": "npm:@rhilip/vue-cli-plugin-browser-extension@^0.26.0",
Same error.
Replacing with this in package.json solved the issue
"vue-cli-plugin-browser-extension": "npm:@rhilip/vue-cli-plugin-browser-extension@^0.26.0",
this works..
Replacing with this in package.json solved the issue
"vue-cli-plugin-browser-extension": "npm:@rhilip/vue-cli-plugin-browser-extension@^0.26.0",
I am using vue 2. In package.json I put same line of code but I am getting errror as below
Error: Cannot find module 'vue-cli-plugin-browser-extension'
Please help.
My package.json
{ "name": "browserexttest", "version": "0.1.0", "private": true, "scripts": { "serve": "vue-cli-service build --mode development --watch", "build": "vue-cli-service build", "lint": "vue-cli-service lint" }, "dependencies": { "@rhilip/vue-cli-plugin-browser-extension": "^0.27.0", "core-js": "^3.8.3", "vue": "^2.6.14" }, "devDependencies": { "@babel/core": "^7.12.16", "@babel/eslint-parser": "^7.12.16", "@vue/cli-plugin-babel": "~5.0.0", "@vue/cli-plugin-eslint": "~5.0.0", "@vue/cli-service": "~5.0.0", "eslint": "^7.32.0", "eslint-plugin-vue": "^8.0.3", "vue-cli-plugin-browser-extension": "npm:@rhilip/vue-cli-plugin-browser-extension@^0.27.0", "vue-template-compiler": "^2.6.14" }, "eslintConfig": { "root": true, "env": { "node": true, "webextensions": true }, "extends": [ "plugin:vue/essential", "eslint:recommended" ], "parserOptions": { "parser": "@babel/eslint-parser" }, "rules": {} }, "browserslist": [ "> 1%", "last 2 versions", "not dead" ] }