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

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.

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

React Native IOS- Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')

https://github.com/facebook/react-native/issues/32539
System:
OS: macOS 11.6
CPU: (8) arm64 Apple M1
Memory: 145.58 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 17.0.1 - /opt/homebrew/bin/node
Yarn: 1.22.17 - /opt/homebrew/bin/yarn
npm: 8.1.0 - /opt/homebrew/bin/npm
Watchman: 2021.10.18.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
Android SDK: Not Found
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7678000
Xcode: 13.0/13A233 - /usr/bin/xcodebuild
Languages:
Java: Not Found
npmPackages:
#react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.66.1 => 0.66.1
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Gatsby build not compile on save

Always when I saved .js file in gatsby project in gatsby develop, side was rebuild. Now after update from gatsby 3.0 to 4.0 side in same situation does't rebuild. How to fix it ?
System:
OS: Linux 5.10 Ubuntu 20.04.3 LTS (Focal Fossa)
CPU: (12) x64 Intel(R) Core(TM) i5-10600K CPU # 4.10GHz
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.12.0 - ~/.nvm/versions/node/v16.12.0/bin/node
npm: 8.1.0 - ~/.nvm/versions/node/v16.12.0/bin/npm
npmPackages:
gatsby: ^4.0.1 => 4.0.1
gatsby-plugin-image: ^2.0.0 => 2.0.0
gatsby-plugin-manifest: ^4.0.0 => 4.0.0
gatsby-plugin-mdx: ^3.0.0 => 3.0.0
gatsby-plugin-react-helmet: ^5.0.0 => 5.0.0
gatsby-plugin-sass: ^5.0.0 => 5.0.0
gatsby-plugin-sharp: ^4.0.0 => 4.0.0
gatsby-plugin-sitemap: ^5.0.0 => 5.0.0
gatsby-source-filesystem: ^4.0.0 => 4.0.0
gatsby-transformer-remark: ^5.0.0 => 5.0.0
gatsby-transformer-sharp: ^4.0.0 => 4.0.0
npmGlobalPackages:
gatsby: 4.0.1
Hot reload and dependency tracking are still there in v4. Check if the file you're saving is perhaps not imported into your project?

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.

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

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

Categories