False detection on importing deprecated Constants api.

Hello. First, I’m not a native english speaker. Sorry if my language is hard to understand.

I use Expo version 33.0.5 on MacBook with node v.10.16.0. Expo always warn me about importing Constants from old api. But, I’ve not used any Constants api in my project. Is it false detection? or I miss something?

I’ve already installed expo-constants v. 5.0.1

This is a warning that I got.

The following APIs have moved to separate packages and importing them from the "expo" package is deprecated: Constants.

1. Add correct versions of these packages to your project using:

   expo install expo-constants

   If "install" is not recognized as an expo command, update your expo-cli installation.

2. Change your imports so they use specific packages instead of the "expo" package:

 - import { Constants } from 'expo' -> import Constants from 'expo-constants'

Hi @punpro, your English is great btw

It’s most likely that one of your dependencies is importing {Constants} from 'expo' rather than using the new modular imports. I would search for it in your node_modules , and if it’s a library we control I’ll update it, if not you’ll have to submit a PR to that particular library

Hi, thank you for your reply.

I searched all file inside my project, include node_modules dir.
There is no any line of code that import Constants from expo.

I forgot to tell you that this project just has been upgraded from SDK32 to SDK33.
Does this upgrade relevant to this issue?

Yeah, the upgrade is definitely relevant, since we are moving to modular imports as of SDK 33 (see the release notes)

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.