Reputation: 303
I was installed an expo-constant for a test after that I unistalled the expo-constant by
npm uninstall expo-constants
Now when I run my app an error appears:
Unable to resolve module expo-constants from C:\Users..\node_modules\expo-font\build\FontLoader.js: expo-constants could not be found within the project.
Any ideas on what else I can try to resolve this?
The full error below:
If you are sure the module exists, try these steps:
1. Clear watchman watches: watchman watch-del-all
2. Delete node_modules and run yarn install
3. Reset Metro's cache: yarn start --reset-cache
4. Remove the cache: rm -rf /tmp/metro-*
1 | import { CodedError } from '@unimodules/core';
2 | import { Asset } from 'expo-asset';
> 3 | import Constants from 'expo-constants';
| ^
4 | import { Platform } from 'react-native';
5 | import ExpoFontLoader from './ExpoFontLoader';
6 | const isInClient = Constants.appOwnership === 'expo';
Upvotes: 2
Views: 8407
Reputation: 187
you can add this in your package.json
"expo-yarn-workspaces": { "symlinks": ["expo-constants"] }
Regards
Upvotes: 1
Reputation: 11
Try Updating packages to the latest version.
npm update
give a try to install with --force
flag as well if the update has not worked. eg:
npm install --force
Upvotes: 1