Skip to main content
caution

This section refers to the old versions of the MonkJs SDK (version 3.X.X and below). For the v4 docs, please refer to this page.

🧯 Troubleshooting

Failed to construct transformer​

Failed to construct transformer: TypeError: Transformer is not a constructor at getTransformCacheKey

This is a Metro failure.

  1. Verify you have metro/src/JSTransformer/worker.js' file in your node_modules
  2. Open metro.config.js
  3. Specify the transformerPath
/* metro.config.js */

const getConfig = async () => ({
transformerPath: require.resolve('metro/src/JSTransformer/worker.js'),
});

module.exports = getConfig();