Error with new expo release 46.0.0

Please provide the following:

  1. SDK Version: 46.0.0
  2. Platforms(Android/iOS/web/all): web
  3. Add the appropriate β€œTag” based on what Expo library you have a question on.

I used to make web app with expo SDK 45.0.0 where everything where right :+1:.
But After creating a new expo app via npm, yarn or npx I got an error that said " can’t not found react " and then another error: with chokidar lock or busy.
When I looked at my previous project in the package.json i found things were different from SDK 45.0.0 and 46.0.0 so maybe the problem come from that.

Hi @kajc

Please show what commands you ran when you got those errors and also the full error output?

Also, what differences did you find between the old app and the new one?

Also, did you perhaps try upgrading the SDK 45 app to SDK 46?

Hi @wodin, thank you for reply.
I ran expo start but i got several times the same issues even when i tried with yarn start
or npm start.
I have a project from the sdk 45 that correctly works using all these commands but when
i used these commands with the new project i began with the new sdk 46, i got a lot of
errors :

Starting Metro Bundler
β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„
β–ˆ β–„β–„β–„β–„β–„ β–ˆ β–€β–€β–„ β–„β–ˆβ–ˆ β–ˆ β–„β–„β–„β–„β–„ β–ˆ
β–ˆ β–ˆ β–ˆ β–ˆβ–ˆβ–ˆ β–„β–„ β–„β–„ β–ˆ β–ˆ β–ˆ β–ˆ
β–ˆ β–ˆβ–„β–„β–„β–ˆ β–ˆ β–„β–„ β–ˆβ–„β–ˆβ–ˆβ–„β–ˆ β–ˆβ–„β–„β–„β–ˆ β–ˆ
β–ˆβ–„β–„β–„β–„β–„β–„β–„β–ˆ β–ˆ β–€ β–ˆ β–€ β–ˆβ–„β–„β–„β–„β–„β–„β–„β–ˆ
β–ˆβ–„ β–ˆβ–€ β–„β–€ β–ˆβ–ˆβ–€ β–€β–„β–„ β–„β–„β–ˆβ–ˆ β–ˆ
β–ˆβ–€β–ˆβ–„β–„β–€β–€β–„β–ˆβ–€β–€β–ˆβ–„β–ˆβ–ˆβ–„β–„β–„β–ˆβ–€β–„β–ˆβ–„β–„β–ˆβ–„β–ˆ
β–ˆβ–ˆβ–„β–€ β–€β–ˆβ–„ β–ˆβ–„ β–ˆ β–€β–ˆ β–ˆβ–ˆβ–ˆβ–€ β–€β–ˆ
β–ˆβ–„β–„β–ˆ β–„β–€β–„β–„β–„β–„β–ˆβ–€ β–„ β–„β–ˆ β–„β–ˆβ–€β–„β–ˆ
β–ˆβ–„β–„β–„β–ˆβ–ˆβ–ˆβ–„β–ˆβ–€β–€β–€β–ˆβ–„β–€ β–ˆ β–„β–„β–„ β–€β–ˆ β–ˆ
β–ˆ β–„β–„β–„β–„β–„ β–ˆβ–€β–€β–€β–„β–„β–„ β–ˆ β–ˆβ–„β–ˆ β–ˆβ–ˆβ–€β–„β–ˆ
β–ˆ β–ˆ β–ˆ β–ˆβ–ˆβ–€β–„ β–ˆβ–ˆ β–„β–„β–„β–„ β–€ β–ˆβ–ˆ
β–ˆ β–ˆβ–„β–„β–„β–ˆ β–ˆ β–ˆβ–„β–„β–„β–„ β–€β–€β–ˆ β–„β–ˆβ–ˆβ–„β–„β–ˆ
β–ˆβ–„β–„β–„β–„β–„β–„β–„β–ˆβ–„β–„β–ˆβ–„β–ˆβ–ˆβ–„β–„β–„β–„β–ˆβ–„β–„β–ˆβ–ˆβ–ˆβ–„β–ˆ

β€Ί Metro waiting on exp://192.168.8.101:19000
β€Ί Scan the QR code above with Expo Go (Android) or the Camera app (iOS)

β€Ί Press a β”‚ open Android
β€Ί Press w β”‚ open web

β€Ί Press r β”‚ reload app
β€Ί Press m β”‚ toggle menu

β€Ί Press ? β”‚ show all commands

Logs for your project will appear below. Press Ctrl+C to exit.
Starting Webpack on port 19006 in development mode.
:bangbang: ο½’wdsο½£: transportMode is an experimental option, meaning its usage could potentially change without warning
β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„
β–ˆ β–„β–„β–„β–„β–„ β–ˆ β–€β–€β–„ β–„β–ˆβ–ˆ β–ˆ β–„β–„β–„β–„β–„ β–ˆ
β–ˆ β–ˆ β–ˆ β–ˆβ–ˆβ–ˆ β–„β–„ β–„β–„ β–ˆ β–ˆ β–ˆ β–ˆ
β–ˆ β–ˆβ–„β–„β–„β–ˆ β–ˆ β–„β–„ β–ˆβ–„β–ˆβ–ˆβ–„β–ˆ β–ˆβ–„β–„β–„β–ˆ β–ˆ
β–ˆβ–„β–„β–„β–„β–„β–„β–„β–ˆ β–ˆ β–€ β–ˆ β–€ β–ˆβ–„β–„β–„β–„β–„β–„β–„β–ˆ
β–ˆβ–„ β–ˆβ–€ β–„β–€ β–ˆβ–ˆβ–€ β–€β–„β–„ β–„β–„β–ˆβ–ˆ β–ˆ
β–ˆβ–€β–ˆβ–„β–„β–€β–€β–„β–ˆβ–€β–€β–ˆβ–„β–ˆβ–ˆβ–„β–„β–„β–ˆβ–€β–„β–ˆβ–„β–„β–ˆβ–„β–ˆ
β–ˆβ–ˆβ–„β–€ β–€β–ˆβ–„ β–ˆβ–„ β–ˆ β–€β–ˆ β–ˆβ–ˆβ–ˆβ–€ β–€β–ˆ
β–ˆβ–„β–„β–ˆ β–„β–€β–„β–„β–„β–„β–ˆβ–€ β–„ β–„β–ˆ β–„β–ˆβ–€β–„β–ˆ
β–ˆβ–„β–„β–„β–ˆβ–ˆβ–ˆβ–„β–ˆβ–€β–€β–€β–ˆβ–„β–€ β–ˆ β–„β–„β–„ β–€β–ˆ β–ˆ
β–ˆ β–„β–„β–„β–„β–„ β–ˆβ–€β–€β–€β–„β–„β–„ β–ˆ β–ˆβ–„β–ˆ β–ˆβ–ˆβ–€β–„β–ˆ
β–ˆ β–ˆ β–ˆ β–ˆβ–ˆβ–€β–„ β–ˆβ–ˆ β–„β–„β–„β–„ β–€ β–ˆβ–ˆ
β–ˆ β–ˆβ–„β–„β–„β–ˆ β–ˆ β–ˆβ–„β–„β–„β–„ β–€β–€β–ˆ β–„β–ˆβ–ˆβ–„β–„β–ˆ
β–ˆβ–„β–„β–„β–„β–„β–„β–„β–ˆβ–„β–„β–ˆβ–„β–ˆβ–ˆβ–„β–„β–„β–„β–ˆβ–„β–„β–ˆβ–ˆβ–ˆβ–„β–ˆ

β€Ί Metro waiting on exp://192.168.8.101:19000
β€Ί Scan the QR code above with Expo Go (Android) or the Camera app (iOS)

β€Ί Webpack waiting on http://192.168.8.101:19006
β€Ί Expo Webpack (web) is in beta, and subject to breaking changes!

β€Ί Press a β”‚ open Android
β€Ί Press w β”‚ open web

β€Ί Press r β”‚ reload app
β€Ί Press m β”‚ toggle menu

β€Ί Press ? β”‚ show all commands

β€Ί Open in the web browser…
β€Ί Press ? β”‚ show all commands
Web Bundling complete 87824ms
…/…/…/…/node_modules/react-dom/cjs/react-dom.development.js:26
Module not found: Can’t resolve β€˜react’
24 | REACT_DEVTOOLS_GLOBAL_HOOK.registerInternalModuleStart(new Error());
25 | }

26 | var React = require(β€˜react’);
27 | var Scheduler = require(β€˜scheduler’);
28 |
29 | var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
…/…/…/…/node_modules/react-native-web/dist/exports/AppRegistry/renderApplication.js:16
Module not found: Can’t resolve β€˜react’
14 | import render, { hydrate } from β€˜β€¦/render’;
15 | import StyleSheet from β€˜β€¦/StyleSheet’;
16 | import React from β€˜react’;
17 | export default function renderApplication(RootComponent, WrapperComponent, callback, options) {
18 | var shouldHydrate = options.hydrate,
19 | initialProps = options.initialProps,
…/…/…/…/node_modules/react-native-web/dist/exports/AppRegistry/AppContainer.js:10
Module not found: Can’t resolve β€˜react’
8 | *
9 | /
10 | import * as React from β€˜react’;
11 | import StyleSheet from β€˜β€¦/StyleSheet’;
12 | import View from β€˜β€¦/View’;
13 | var RootTagContext = /
#PURE*/React.createContext(null);
…/…/…/…/node_modules/react-native-web/dist/exports/Text/index.js:14
Module not found: Can’t resolve β€˜react’
12 | *
13 | /
14 | import * as React from β€˜react’;
15 | import createElement from β€˜β€¦/createElement’;
16 | import * as forwardedProps from β€˜β€¦/…/modules/forwardedProps’;
17 | import pick from β€˜β€¦/…/modules/pick’;
…/…/…/…/node_modules/react-native-web/dist/exports/Text/TextAncestorContext.js:9
Module not found: Can’t resolve β€˜react’
7 | *
8 | /
9 | import { createContext } from β€˜react’;
10 | var TextAncestorContext = /
#PURE
/createContext(false);
11 | export default TextAncestorContext;
…/…/…/…/node_modules/react-native-web/dist/exports/View/index.js:13
Module not found: Can’t resolve β€˜react’
11 | *
12 | */
13 | import * as React from β€˜react’;
14 | import createElement from β€˜β€¦/createElement’;
15 | import * as forwardedProps from β€˜β€¦/…/modules/forwardedProps’;
16 | import pick from β€˜β€¦/…/modules/pick’;
…/…/…/…/node_modules/react-native-web/dist/exports/createElement/index.js:11
Module not found: Can’t resolve β€˜react’
9 | import AccessibilityUtil from β€˜β€¦/…/modules/AccessibilityUtil’;
10 | import createDOMProps from β€˜β€¦/…/modules/createDOMProps’;
11 | import React from β€˜react’;
12 | import { LocaleProvider } from β€˜β€¦/…/modules/useLocale’;
13 |
14 | var createElement = (component, props, options) => {
…/…/…/…/node_modules/react-native-web/dist/modules/mergeRefs/index.js:9
Module not found: Can’t resolve β€˜react’
7 | *
8 | */
9 | import * as React from β€˜react’;
10 | export default function mergeRefs() {
11 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
12 | args[_key] = arguments[_key];
…/…/…/…/node_modules/react-native-web/dist/modules/useLayoutEffect/index.js:12
Module not found: Can’t resolve β€˜react’
10 | *
11 | */
12 | import { useEffect, useLayoutEffect } from β€˜react’;
13 | import canUseDOM from β€˜β€¦/canUseDom’;
14 | var useLayoutEffectImpl = canUseDOM ? useLayoutEffect : useEffect;
15 | export default useLayoutEffectImpl;
…/…/…/…/node_modules/react-native-web/dist/modules/useLocale/index.js:9
Module not found: Can’t resolve β€˜react’
7 | *
8 | */
9 | import React, { createContext, useContext } from β€˜react’;
10 | import { isLocaleRTL } from β€˜./isLocaleRTL’;
11 | var defaultLocale = {
12 | direction: β€˜ltr’,
…/…/…/…/node_modules/react-native-web/dist/modules/useMergeRefs/index.js:9
Module not found: Can’t resolve β€˜react’
7 | *
8 | */
9 | import * as React from β€˜react’;
10 | import mergeRefs from β€˜β€¦/mergeRefs’;
11 | export default function useMergeRefs() {
12 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
…/…/…/…/node_modules/react-native-web/dist/modules/usePlatformMethods/index.js:14
Module not found: Can’t resolve β€˜react’
12 | import createDOMProps from β€˜β€¦/createDOMProps’;
13 | import useStable from β€˜β€¦/useStable’;
14 | import { useRef } from β€˜react’;
15 | var didWarn = false;
16 | var emptyObject = {};
17 |
…/…/…/…/node_modules/react-native-web/dist/modules/useResponderEvents/index.js:19
Module not found: Can’t resolve β€˜react’
17 | * }
18 | */
19 | import * as React from β€˜react’;
20 | import * as ResponderSystem from β€˜./ResponderSystem’;
21 | var emptyObject = {};
22 | var idCounter = 0;
…/…/…/…/node_modules/react-native-web/dist/modules/useStable/index.js:9
Module not found: Can’t resolve β€˜react’
7 | *
8 | */
9 | import * as React from β€˜react’;
10 | var UNINITIALIZED = typeof Symbol === β€˜function’ && typeof Symbol() === β€˜symbol’ ? Symbol() : Object.freeze({});
11 | export default function useStable(getInitialValue) {
12 | var ref = React.useRef(UNINITIALIZED);
Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat β€˜C:\hiberfil.sys’

Below is the output !

Here are some change i found :

sdk 45.0.0

{
β€œname”: β€œhw”,
β€œversion”: β€œ1.0.0”,
β€œmain”: β€œnode_modules/expo/AppEntry.js”,
β€œscripts”: {
β€œstart”: β€œexpo start”,
β€œandroid”: β€œexpo start --android”,
β€œios”: β€œexpo start --ios”,
β€œweb”: β€œexpo start --web”,
β€œeject”: β€œexpo eject”
},
β€œdependencies”: {
β€œexpo”: β€œ~45.0.0”,
β€œexpo-status-bar”: β€œ~1.3.0”,
β€œreact”: β€œ17.0.2”,
β€œreact-dom”: β€œ17.0.2”,
β€œreact-native”: β€œ0.68.2”,
β€œreact-native-web”: β€œ0.17.7”
},
β€œdevDependencies”: {
β€œ@babel/core”: β€œ^7.12.9”
},
β€œprivate”: true
}

and sdk 46.0.0

{
β€œname”: β€œthreedot”,
β€œversion”: β€œ1.0.0”,
β€œmain”: β€œnode_modules/expo/AppEntry.js”,
β€œscripts”: {
β€œstart”: β€œexpo start”,
β€œandroid”: β€œexpo start --android”,
β€œios”: β€œexpo start --ios”,
β€œweb”: β€œexpo start --web”
},
β€œdependencies”: {
β€œexpo”: β€œ~46.0.9”,
β€œexpo-status-bar”: β€œ~1.4.0”,
β€œreact”: β€œ18.0.0”,
β€œreact-native”: β€œ0.69.5”
},
β€œdevDependencies”: {
β€œ@babel/core”: β€œ^7.12.9”
},
β€œprivate”: true
}

There are also some differences in the main folder, they removed .idea folder form 45 to 46
So if it can help to solve that problem