module schedule/tracking does not exist in the Haste module map - javascript

React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i3-7100 CPU # 3.90GHz
Memory: 559.26 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.11.0 - /usr/local/bin/node
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
IDEs:
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: 16.0.0 => 16.0.0
react-native: ^0.57.3 => 0.57.3
npmGlobalPackages:
react-native-cli: 2.0.1
here is react-native info
similar solutions from GitHub does not work for me

The error appears due to the renaming of schedule/tracking to schedule/tracing from react#16.5.1 to react#16.5.2.
The issue is resolved by choosing the correct version of react for your react-native version:
RN <= 0.57.2 --> react <= 16.5.1
Be sure to lock your react version in this case. Your package.json should look like this: react#16.5.1. Check that there isn't any ^ before the version.
(having react#^16.5.1 in your package.json may resolve to a react version >= 16.5.1, which will NOT work)
example command: yarn add react#16.5.1
RN >= 0.57.3 --> react >= 16.6
example command: yarn add react#16.6.0
For further Information you can check the Github Issue #21150 and Github Issue #21140.
Sidenote for Expo Users:
If you are using expo, be aware that expo <= 32.0.0 uses a react-native version <= 0.57.2 and therefore will require the react version to be <= 16.5.1
If it does not work immediately
Try to reset the cache of your packager before continuing: yarn start --reset-cache

If running with your versions of npm packages:
react: 16.0.0 => 16.0.0
react-native: ^0.57.3 => 0.57.3
We'll have the same error as below:
error: bundling failed: Error: Unable to resolve module `scheduler/tracing` from
`C:\projects\rnw\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-
dev.js`: Module `scheduler/tracing` does not exist in the Haste module map
Upgrade to the following versions:
"dependencies": {
"react": "16.6.3",
"react-native": "0.58.1"
},
And the error will be gone.

If there is an error related to module Schedule/tracking not found, use react-native 0.55.0 version. Above RN->0.55.0 version schedule/tracking package is renamed or moved to another module which is not found by node server.
Command: react-native init (Project Name) --version 0.55.0

Related

React Native : Unable to resolve module stream

The project was working fine a while ago, but suddenly it can't be executed, can anyone help me?
I have tried any clear command and action.
Output of npx react-native info
System:
OS: Windows 10 10.0.18363
CPU: (8) x64 Intel(R) Core(TM) i7-7700 CPU # 3.60GHz
Memory: 16.13 GB / 31.96 GB
Binaries:
Node: 16.15.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.15 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.10.0 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: AI-212.5712.43.2112.8512546
Visual Studio: Not Found
Languages:
Java: 11.0.15
npmPackages:
#react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.1 => 0.64.1
react-native-windows: Not Found
npmGlobalPackages:
*react-native*: Not Found

Next Js + Amplify #sls-next/-component error on deployment

I've deployed my app on amplify, the backend deployment is all good to go.
I've connected the frontend to my gitlab repo, and after debugging it is finally compiled successfully. Immediately after the compiling, I get this error.
Starting SSR Build...
[ERROR]: Error: Command failed: npm install #sls-next/-component#3.7.0 --prefix /root/./
I have tried to override the env with the following commands (I've tried previous versions of both next and node, however it doesnt pass the compiling phase unless I use the following)
Amplify CLI - latest
Next.js version - latest
Node.js version - 17
This is my amplify.yml
version: 1
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- npm run build
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- node_modules/**/*
My node_module versions on the project are
"next": "^12.1.7-canary.16",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"aws-amplify": "^4.3.23"
my node version is 17.0.9 and my local amplify cli is 8.2.0
I should note my build passes locally
What am I missing? I dont have serverless installed anywhere on my project, it appears to be something amplify is trying to install. Perhaps I should be exporting after the build? But this is an ssr app, not static. I have a feeling this is a problem with conflicting versions.
,

Metro bundler: Cannot read properties of undefined (reading 'transformFile')

I've stuck with a problem after update my project to expo SDK 43
I've tried different LTS node version (14.8.1 ,16.1.3 and 17.0.1) but the problem was not solved.
My colleagues have not this problem on thier macs with intel chipset so I think it's can be cause by macbook with m1 chipset.
I will be very thankful if you can help me to solve this metro bundler problem
System:
OS: macOS 12.0.1
CPU: (8) x64 Apple M1
Memory: 24.91 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.0 - /var/folders/7x/bz3djxwn5kd3k16j2015bvhc0000gn/T/yarn--1637063410446-0.9243514868796017/node
Yarn: 1.22.10 - /var/folders/7x/bz3djxwn5kd3k16j2015bvhc0000gn/T/yarn--1637063410446-0.9243514868796017/yarn
npm: 6.14.11 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
Languages:
Java: Not Found
npmPackages:
#react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.2 => 0.64.2
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
IOS simulator log
Terminal log
The issue is probably due to node 17.x, i recommande downgrading to node 14.18.1, then delete node_modules and reinstall them.

React Native cannot npx init project, cannot find module error

npx react-native init MyApp
√ Downloading template × Copying template error Error: Cannot find
module
'C:\Users\%%%%\AppData\Local\Temp\rncli-init-template-rVvcjE\node_modules\react-native\template.config'
Require stack:
- C:\Users\%%%%%\node_modules\react-native\node_modules#react-native-community\cli\build\commands\init\template.js
- C:\Users\%%%%%\node_modules\react-native\node_modules#react-native-community\cli\build\commands\init\init.js
- C:\Users\%%%%%\node_modules\react-native\node_modules#react-native-community\cli\build\commands\init\index.js
- C:\Users\%%%%%\node_modules\react-native\node_modules#react-native-community\cli\build\commands\index.js
- C:\Users\%%%%%\node_modules\react-native\node_modules#react-native-community\cli\build\index.js
- C:\Users\%%%%%\node_modules\react-native\cli.js
npx react-native info
info Fetching system and libraries information... System:
OS: Windows 10 10.0.18363
CPU: (8) x64 AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx
Memory: 3.88 GB / 6.80 GB Binaries:
Node: 12.13.1 - C:\Program Files\nodejs\node.EXE
npm: 6.12.1 - C:\Program Files\nodejs\npm.CMD SDKs:
Android SDK:
API Levels: 21, 22, 23, 24, 25, 26, 27, 28, 29
Build Tools: 28.0.3, 29.0.2 IDEs:
Android Studio: Version 3.5.0.0 AI-191.8026.42.35.5977832 npmPackages:
react-native: 0.61.5 => 0.61.5
To avoid unnecessary responses npm uninstall react-native-cli -g has been already done.
rncli-init-template-rVvcjE from the file path mentioned above does not even exist and I am not sure why. Thanks, everybody for help in advance I am new to stack overflow I have only been programming competitively so far. No stranger to algorithms but for cross-platform development frameworks, I'm a newbie.
Try to init with yarn. Yarn has a better performance than npm (link July 2019).
Install yarn first
npm install -g yarn
Install react-native-cli. If don't work try with sudo.
yarn global add react-native-cli
Create yout project
react-native init myapp
Related post
first uninstall your nodejs using nodejs setup(the same version you have installed)
reboot your computer (optional)
after all install again nodejs (nodejs.org/en/download/) and all will be fine.

Cordova 6.4.0: android platform install Whitelist error

I'm setting up a first cordova projecct.
After installing globally Cordova and creting a first app repository
am trying to set up the android platform within this command:
cordova platform add android --save
But this action ends up by generation this error message:
BUILD FAILED
Total time: 0.989 secs Failed to install
'cordova-plugin-whitelist':Error:
/home/firas/Bureau/Cordova/HelloWorld/HelloWorld/platforms/android/gradlew:
Command failed with exit code 1
at ChildProcess.whenDone (/home/firas/Bureau/Cordova/HelloWorld/HelloWorld/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:821:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) Error:
/home/firas/Bureau/Cordova/HelloWorld/HelloWorld/platforms/android/gradlew:
Command failed with exit code 1
I have tried to remove and re-add the adroid platform , but the problem persists , also I have tried to install the whitelist plugin (cordova plugin add cordova-plugin-whitelist#1.0.0 )
but also I faced the same problem , and finish by not being able to build or run my first HelloWord app
Update Cordova version
Set Local Path
Cordova Tutorial
This issue appears especially with Cordova 6.4.0 (latest until 31 December 2016) .
To solve this problem, simply uninstall Cordova and re-install it for the version 6.0.0 which affords more stability with the whitelist component.
Steps:
npm uninstall -g cordova
npm install -g cordova#6.0.0

Categories