bug: `@react-native/polyfills/error-guard.js` not transpiled in distrobution
See original GitHub issueDescription
In trying to integrate @swc/jest
into our React Native codebase - it was discovered that one of the files (error-guard
) was not being transpiled correctly. I’m not sure if this is by design or not - but the sibling files do not have types. So my guess is that this is not intended.
Version
0.66.1
Output of npx react-native info
System:
OS: macOS 12.2.1
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 38.22 MB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
Yarn: 1.19.2 - /usr/local/bin/yarn
npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm
Watchman: 2021.10.18.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /Users/theryn.groetken/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK: Not Found
IDEs:
Android Studio: 4.2 AI-202.7660.26.42.7486908
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.8 - /usr/bin/javac
npmPackages:
@react-native-community/cli: 6.1.0 => 6.1.0
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
Steps to reproduce
See https://github.com/therynamo/SWCJestRepro#swcjestrepro
Snack, code example, screenshot, or link to a repository
Issue Analytics
- State:
- Created 2 years ago
- Reactions:11
- Comments:9
Top Results From Across the Web
node_modules/react-native/Libraries/polyfills/error-guard.js ...
I tried various solutions suggested like adding transformIgnorePatterns but to no avail. can someone help me here ? javascript · reactjs · react ......
Read more >transformignorepatterns - You.com | The AI Search Engine ...
This error shows that "react-native" has not been transformed: ... /Users/xxx/xxx/dev/node_modules/@react-native/polyfills/error-guard.js: Missing semicolon ...
Read more >react-native/polyfills
The CDN for @react-native/polyfills. ... console.js, 17.6 kB, application/javascript. error-guard.js, 3.65 kB, application/javascript.
Read more >realm | Yarn - Package Manager
This project hosts the JavaScript versions of Realm. Currently we support React Native (JSC & Hermes on iOS & Android), Node.js and Electron...
Read more >TypeScript is a waste of time. Change my mind.
Working with older browsers - polyfills or Babel. Static typing and type inference - see point below. 2 - Typed JS is long...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is it possible to have an update on this? Our repository suffer with jest and supporting @swc/jest for testing would be really cool.
I am also encountering this problem…
RN Version 0.65.2
npx react-native info:
jest.config.js:
babel.config.js:
If anyone knows of any work arounds, will gladly give you the stronger of my two kidneys