Updated Expo Router + Expo -> Unable to resolve "framer-motion" from "node_modules/moti/build/core/index.js" #303
-
I get this error on when trying to launch on Web: Unable to resolve "framer-motion" from "node_modules/moti/build/core/index.js"
Everything was working fine until I updated Expo Router and Expo. I ran npm i framer-motion and that didn't work either. Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 13 replies
-
same problem here. were you able to resolve this? |
Beta Was this translation helpful? Give feedback.
-
I think the problem is, that expo 49 uses metro instead of webpack as its bundler, and you somehow have to configure metro to handle this. problem is, I have no idea how |
Beta Was this translation helpful? Give feedback.
-
are you using npm? |
Beta Was this translation helpful? Give feedback.
-
any news on this topic? We cannot roll out OTA Updates currently. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
This error is due to Metro web. Please see this solution: In your metro config file: const { getDefaultConfig } = require('expo/metro-config');
const config = getDefaultConfig(__dirname);
config.resolver.assetExts.push(
// Adds support for framer-motion
'mjs’
);
config.resolver.assetExts.push(
'cjs’
);
module.exports = config; |
Beta Was this translation helpful? Give feedback.
This error is due to Metro web. Please see this solution:
In your metro config file: