React-native: bundling failed: Error: Unable to resolve module `schedule/tracking`

Created on 17 Sep 2018  路  16Comments  路  Source: facebook/react-native

Environment

React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
      Memory: 52.01 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.11.2 - ~/.nvm/versions/node/v8.11.2/bin/node
      npm: 6.4.1 - ~/.nvm/versions/node/v8.11.2/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
    IDEs:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
    npmPackages:
      @types/react: 16.4.6 => 16.4.6 
      @types/react-native: 0.55.27 => 0.55.27 
      react: 16.4.1 => 16.4.1 
      react-native: ^0.57.0 => 0.57.0 
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1
      react-native-fbsdk: 0.7.0
      react-native: 0.56.0

Description

After I upgraded react-native from v0.57.0-rc.3 to ^0.57.0 I am getting this error on both ios and android:

error: bundling failed: Error: Unable to resolve module `schedule/tracking` from `/Users/sagarguhe/NodeDevelopment/balletWorkout/node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js`: Module `schedule/tracking` does not exist in the Haste module map

This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
  1. Clear watchman watches: `watchman watch-del-all`.
  2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
  3. Reset Metro Bundler cache: `rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache`.
  4. Remove haste cache: `rm -rf /tmp/haste-map-react-native-packager-*`.
    at ModuleResolver.resolveDependency (/Users/sagarguhe/NodeDevelopment/balletWorkout/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:209:1301)
    at ResolutionRequest.resolveDependency (/Users/sagarguhe/NodeDevelopment/balletWorkout/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:83:16)
    at DependencyGraph.resolveDependency (/Users/sagarguhe/NodeDevelopment/balletWorkout/node_modules/metro/src/node-haste/DependencyGraph.js:238:485)
    at Object.resolve (/Users/sagarguhe/NodeDevelopment/balletWorkout/node_modules/metro/src/lib/transformHelpers.js:180:25)
    at dependencies.map.result (/Users/sagarguhe/NodeDevelopment/balletWorkout/node_modules/metro/src/DeltaBundler/traverseDependencies.js:311:29)
    at Array.map (<anonymous>)
    at resolveDependencies (/Users/sagarguhe/NodeDevelopment/balletWorkout/node_modules/metro/src/DeltaBundler/traverseDependencies.js:307:16)
    at /Users/sagarguhe/NodeDevelopment/balletWorkout/node_modules/metro/src/DeltaBundler/traverseDependencies.js:164:33
    at Generator.next (<anonymous>)
    at step (/Users/sagarguhe/NodeDevelopment/balletWorkout/node_modules/metro/src/DeltaBundler/traverseDependencies.js:266:307)

I deleted node_modules/.cache dir, cleared watchman watches, reset-cache but none worked.

Locked

Most helpful comment

The number of issues with react native have suddenly increased a lot

All 16 comments

It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists.

The ":rewind:Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.

Follow this changelog who are facing the same issue. I needed to upgrade package.json and changed react to the latest i.e. v16.5.1 and removed node_modules and npm install.

@sagarguhe This doesnt work for me, I tried it and then I landed in another error of "bundling failed: Error: Unable to resolve module react-native/Libraries/Renderer/shims/ReactNativePropRegistry"

React Native Environment Info:
System:
OS: macOS High Sierra 10.13.5
CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Memory: 1.94 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.12.0 - /usr/local/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
IDEs:
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.1 => 16.5.1
react-native: ^0.57.0 => 0.57.0
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7

@akhiljain100 checkout this. It helped me fixing the issue you are running into.

The solution in here helped me fixing our issue.

Fix it with npm i [email protected] --save-dev

The number of issues with react native have suddenly increased a lot

Even though schedule has a later version, 0.5.0 did not work. However, 0.4.0 did work.

The issue got resolved for me when I upgraded and locked my React version also
My versions in my package.json

    "react": "16.6.3",
    "react-native": "0.57.8",

@vrajeshkanna thank. this is solution if you have error "chedule/tracking "

@vrajeshkanna , not working in my case!

@knspatel I had this issue while ejecting from expo as expo had a different version of react-native(a custom .gz file from expo) and react versions. When I fixed the versions of both react and react native it fixed the "schedule/tracking" issue for me.

Haven't found solution till now ..

React Native Environment Info:
System:
OS: macOS 10.14.3
CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 41.11 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.12.0 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
IDEs:
Android Studio: 3.1 AI-173.4720617
Xcode: 10.2/10E125 - /usr/bin/xcodebuild
npmPackages:
react: 16.4.1 => 16.4.1
react-native: 0.56.0 => 0.56.0
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
react-native-progress-hud: 1.0.4
react-native-simplest-hud: 3.0.0

So many problems with react native

I miss programming in Swift.

I am trying to upgrade to RN 0.59.3 (my understanding is that I need 0.59 to get 64 bit, required by Play Store by August). I am seeing an "Unable to resolve module 'scheduler/tracing'" message. (Note that it says "scheduler/tracing", not "schedule/tracking".) I tried setting "react": "^16.8.3" in dependencies and "react-test-renderer": "16.8.3" in devDependencies in the package.json file, but no change. Also tried "16.6.0-alpha.8af6728", since that was suggested here, but no difference. I believe that RN 0.59 needs react 16.8. Any suggestions?

I am trying to upgrade to RN 0.59.3 (my understanding is that I need 0.59 to get 64 bit, required by Play Store by August). I am seeing an "Unable to resolve module 'scheduler/tracing'" message. (Note that it says "scheduler/tracing", not "schedule/tracking".) I tried setting "react": "^16.8.3" in dependencies and "react-test-renderer": "16.8.3" in devDependencies in the package.json file, but no change. Also tried "16.6.0-alpha.8af6728", since that was suggested here, but no difference. I believe that RN 0.59 needs react 16.8. Any suggestions?

any update for this? i facing same problem after upgrade to react-native 0.59

@Kevinpahlevi I created a new post with this issue: https://github.com/facebook/react-native/issues/24573 . The short version is that after spending several days trying to upgrade, in the end, I created a new 0.59 project and copied the source code and resources over to it. It was a fairly small project, so wasn't too hard to do.

Was this page helpful?
0 / 5 - 0 ratings