BUNDLE ./index.js
error: index.js: Duplicate plugin/preset detected.
If you'd like to use two separate instances of a plugin,
they need separate names, e.g.
plugins: [
['some-plugin', {}],
['some-plugin', {}, 'some unique name'],
]
Duplicates detected are:
[
{
"alias": "/Users/hannomargelo/Documents/Github/expensify-app-fork/node_modules/babel-plugin-module-resolver/lib/index.js",
"options": {
"extensions": [
".native.js",
".native.jsx",
".native.ts",
".native.tsx",
".js",
".jsx",
".ts",
".tsx",
".ios.js",
".ios.jsx",
".ios.ts",
".ios.tsx",
".android.js",
".android.jsx",
".android.ts",
".android.tx"
],
"alias": {
"@assets": "./assets",
"@components": "./src/components",
"@hooks": "./src/hooks",
"@libs": "./src/libs",
"@navigation": "./src/libs/Navigation",
"@pages": "./src/pages",
"@styles": "./src/styles",
"@src": "./src",
"@userActions": "./src/libs/actions"
}
},
"dirname": "/Users/hannomargelo/Documents/Github/expensify-app-fork",
"ownPass": false,
"file": {
"request": "module-resolver",
"resolved": "/Users/hannomargelo/Documents/Github/expensify-app-fork/node_modules/babel-plugin-module-resolver/lib/index.js"
}
},
{
"alias": "/Users/hannomargelo/Documents/Github/expensify-app-fork/node_modules/babel-plugin-module-resolver/lib/index.js",
"options": {
"root": [
"./"
],
"alias": {
"ReactNativeRenderer-prod": "/Users/hannomargelo/Documents/Github/expensify-app-fork/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling",
"scheduler/tracing": "scheduler/tracing-profiling"
}
},
"dirname": "/Users/hannomargelo/Documents/Github/expensify-app-fork",
"ownPass": false,
"file": {
"request": "module-resolver",
"resolved": "/Users/hannomargelo/Documents/Github/expensify-app-fork/node_modules/babel-plugin-module-resolver/lib/index.js"
}
}
]
Details
This PR:
introduced a regression, where when you said
CAPTURE_METRICS=truein your env and try to run the app, you'll get the following error:Reason / solution
This is because if
CAPTURE_METRICSin babel.config we push a second instance of themodule-resolverplugin. Before the PR it was the only instance, and thus it was working:App/babel.config.js
Lines 88 to 93 in 2707647