Environment:
- uniwind: 1.10.0
- expo: 57.0.8
- expo-router: 57.0.8
- react-native: 0.86.0
- metro: 0.84.4
- pnpm
- Android Development Build
Metro config:
const { getDefaultConfig } = require('expo/metro-config');
const { withUniwindConfig } = require('uniwind/metro');
const config = getDefaultConfig(__dirname);
module.exports = withUniwindConfig(config, {
cssEntryFile: './src/global.css',
dtsFile: './src/uniwind-types.d.ts',
});
Error:
Unable to resolve module ./node_modules/expo-router/entry from the project root.
The file exists at node_modules/expo-router/entry.js.
The stack trace passes through:
uniwind/dist/metro/index.cjs
- nativeResolver
- resolveRequest
Workaround:
Adding the following .npmrc and reinstalling dependencies fixes the issue:
node-linker=hoisted
pnpm's default isolated node_modules layout consistently reproduces the issue.
maybe related: expo/router #748
Environment:
Metro config:
Error:
Unable to resolve module ./node_modules/expo-router/entry from the project root.
The file exists at node_modules/expo-router/entry.js.
The stack trace passes through:
uniwind/dist/metro/index.cjs
Workaround:
Adding the following .npmrc and reinstalling dependencies fixes the issue:
node-linker=hoisted
pnpm's default isolated node_modules layout consistently reproduces the issue.
maybe related: expo/router #748