Skip to content

Updated Expo Router + Expo -> Unable to resolve "framer-motion" from "node_modules/moti/build/core/index.js" #303

Answered by nandorojo
johnmccants002 asked this question in Q&A
Discussion options

You must be logged in to vote

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;

Replies: 6 comments 13 replies

Comment options

You must be logged in to vote
2 replies
@johnmccants002
Comment options

@nandorojo
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@flowgrow
Comment options

Comment options

You must be logged in to vote
2 replies
@nandorojo
Comment options

@johnmccants002
Comment options

This comment was marked as off-topic.

Comment options

You must be logged in to vote
8 replies
@nandorojo
Comment options

@nandorojo
Comment options

@abanobboles
Comment options

@SomayChauhan
Comment options

@janziemba
Comment options

Answer selected by nandorojo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
9 participants