cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Must supply a TargetProvider to a new TargetableSet. magento PWA extensions

Error: Must supply a TargetProvider to a new TargetableSet. magento PWA extensions

Get this error then make extension 1 to 1 by tutorial https://developer.adobe.com/commerce/pwa-studio/tutorials/extensions/taglist/#prerequisites

Error: Must supply a TargetProvider to a new TargetableSet.

 

 webpack-dev-server --progress --color --env.mode development
Error: Must supply a TargetProvider to a new TargetableSet.
    at new TargetableSet (/home/user/web/magento2-pwa/pwa/node_modules/taglist/node_modules/@magento/pwa-buildpack/lib/WebpackTools/targetables/TargetableSet.js:28:19)
    at Function.using (/home/user/web/magento2-pwa/pwa/node_modules/taglist/node_modules/@magento/pwa-buildpack/lib/WebpackTools/targetables/TargetableSet.js:23:16)
    at Object.module.exports [as intercept] (/home/user/web/magento2-pwa/pwa/node_modules/taglist/src/targets/intercept.js:5:37)
    at /home/user/web/magento2-pwa/pwa/node_modules/@magento/pwa-buildpack/lib/BuildBus/BuildBus.js:198:23
    at Array.forEach (<anonymous>)
    at BuildBus.runPhase (/home/user/web/magento2-pwa/pwa/node_modules/@magento/pwa-buildpack/lib/BuildBus/BuildBus.js:186:20)
    at BuildBus.init (/home/user/web/magento2-pwa/pwa/node_modules/@magento/pwa-buildpack/lib/BuildBus/BuildBus.js:167:14)
    at configureWebpack (/home/user/web/magento2-pwa/pwa/node_modules/@magento/pwa-buildpack/lib/WebpackTools/configureWebpack/configureWebpack.js:130:9)
    at async module.exports (/home/user/web/magento2-pwa/pwa/webpack.config.js:40:20)
Done in 2.50s.

whats wrong with TargetableSet ? i do not find anyone answer on the web

 

1 REPLY 1

Re: Error: Must supply a TargetProvider to a new TargetableSet. magento PWA extensions

intercept look like this 

module.exports = (targets) => {
    const { Targetables } = require("@magento/pwa-buildpack");

    const targetables = Targetables.using(targets);

    targetables.setSpecialFeatures("esModules", "cssModules");
};