From dd3ce041260c7d1e0fd25dbd1f31048f868a7b53 Mon Sep 17 00:00:00 2001 From: Cedric van Putten Date: Fri, 15 Sep 2023 16:22:50 +0200 Subject: [PATCH] chore(runtime): add missing `mjs` extension to source resolver --- runtime/metro.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/metro.config.js b/runtime/metro.config.js index ed84d1bf..1efb11e2 100644 --- a/runtime/metro.config.js +++ b/runtime/metro.config.js @@ -11,6 +11,11 @@ if (boolish('SNACK_EXPORT_WEB', false)) { const semver = require('semver'); config.transformer.publicPath = `/v2/${semver.major(expoVersion)}/assets`; + + // Error: While trying to resolve module `@socket.io/component-emitter` from file `/runtime/node_modules/socket.io-parser/build/esm/index.js`, + // the package `/runtime/node_modules/@socket.io/component-emitter/package.json` was successfully found. + // However, this package itself specifies a `main` module field that could not be resolved + config.resolver.sourceExts.push('mjs'); } module.exports = config;