microsoft/powerbi-visuals-webpack-plugin

Invalid options object. Watch Ignore Plugin has been initialized using an options object that does not match the API schema.

Closed this issue · 3 comments

Following the readme on a blank powerbi visuals project, I get this error message:

[webpack-cli] Failed to load '/Users/ling/Documents/Development/dit/powerbi/[PROJECT NAME]/webpack.config.js' config
[webpack-cli] Invalid options object. Watch Ignore Plugin has been initialized using an options object that does not match the API schema.
 - options[0] should be an object:
   object { paths }
 - options[1] should be an object:
   object { paths }

[PROJECT NAME] is a placeholder

Some of my dependencies:

    "webpack": "^5.58.2",
    "webpack-bundle-analyzer": "^4.5.0",
    "webpack-cli": "^4.9.1",
    "webpack-dev-server": "^4.3.1".
    "@babel/core": "^7.15.8",
    "@babel/preset-env": "^7.15.8",
    "babel-loader": "^8.2.2",

I'm having the same problem. Any fixes?

@LingVuDev @tarockx The problem is that the WatchIgnorePlugin needs an object with the paths property:

https://webpack.js.org/plugins/watch-ignore-plugin/

     new webpack.WatchIgnorePlugin({ paths: [
            path.join(__dirname, pluginLocation),
            "./.tmp/**/*.*"
        ]}),

But the examples are in webpack 4 and the plugin only supports webpack 4 and you're using webpack 5.

I have created an issue in order to have webpack 5 support: #72

A new version of the plugin works with webpack 5. Readme also was updated.

Let me know if this issue still happens.