Hi, after upgrade to sdkVersion 31 i’ve this yellow warning in console:
The syntax “import Expo from ‘expo’” has been deprecated in favor of “import { A, B, C } from ‘expo’” or “import * as Expo from ‘expo’”. This sets us up to support static analysis tools like TypeScript and dead-import elimination better in the future. The deprecated import syntax will be removed in SDK 32.
node_modules/expo/build/environment/logging.js:25:23 in warn
node_modules/expo/build/Expo.js:691:4 in get
node_modules/react-native-scripts/build/bin/crna-entry.js:23:7 in <unknown>
node_modules/metro/src/lib/polyfills/require.js:292:12 in loadModuleImplementation
node_modules/metro/src/lib/polyfills/require.js:179:45 in guardedLoadModule
null:null in global code
Where i’ve to fix import code?
After upgrade app i’ve remove node_modules folder and run npm install.
I would recommend using your IDE’s find in project/buffer to see where there is a import Expo from 'expo' call and then change it to one of the newer valid syntax options.
Hi adamjnav,
I searched with Atom throughout the project but I only found it only in comments and in node_modules/react-native-scripts/build/bin/crna-entry-web.js.map file
I perhaps should have clarified a bit. Importing Expo as a whole is deprecated so searching for import Expo from 'expo explicitly may not yield any results, but you may still have an import statement such as import Expo, {AppLoading, Font} from 'expo. Can you check for any import statements that include Expo?
It looks like the issue has to do with node_modules/react-native-scripts/build/bin/crna-entry.js. Expo CLI no longer depends on react-native-scripts. The simplest thing I think is to use the modern Expo entry point and modify your package.json to have: