Skip to content

TypeError: Cannot read properties of undefined (reading 'ignore') #136

Open
@achintha-weerasinghe

Description

@achintha-weerasinghe

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions