-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use import statement outside a module on 0.64.0 #31190
Comments
I am running into the same problem. I posted a similar issue here. |
Facing the same issue. Getting I take it that none of you found a workaround or cause for this? |
Same happened on my end for However I was unable to replicate this issue on a new
Update 1.0: Managed to reproduceSteps to reproduce are listed here microsoft/react-native-code-push#2050 |
I got my project tests passing, please see the discussion here |
Glad that it work for your case, but not mine.. after appending the code (without the library i'm working with)
Im getting another error from react-native itself.
UpdateThanks @josmithua ! It works after appending the following
|
Yes sorry, I forgot to comment that I also had to add |
I believe this issue was introduced by the change to
So that 3rd party libraries like |
Hello, For me, the issue is still happening, actually if I don't use
in my My entire file looks like this
I've tried adding
but from what I understood this configuration is overriding the "transform" one, so it go back to the problem with not solving the even the React import Can somebody help me? |
Hi Guys , |
I'm also in this boat after RN 65 update. |
@raimonkh - same. Any luck? specifically, I'm seeing an issue when it tries to transform |
@princefishthrower I fixed this by adding to the transforms |
i have added the following to my jest configuration
but still getting the following error
i have react-native version 0.66 |
Please provide all the information requested. Issues that do not follow this format are likely to stall.
Description
Please provide a clear and concise description of what the bug is. Include screenshots if needed.
Please test using the latest React Native release to make sure your issue has not already been fixed: https://reactnative.dev/docs/upgrading.html
React Native version:
Run
react-native info
in your terminal and copy the results here.info Fetching system and libraries information...
System:
OS: macOS 11.2.3
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 686.00 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.18.3 - /usr/local/bin/node
Yarn: 1.22.5 - ~/.yarn/bin/yarn
npm: 6.14.8 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK:
API Levels: 23, 28, 29, 30
Build Tools: 28.0.3, 29.0.2, 30.0.2
System Images: android-22 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.1.3 4.1.3
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_272 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.0 => 0.64.0
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
npx react-native init app --template react-native-template-typescript
cd app
yarn add react-native-vector-icons
test.tsx
and paste following:jest ./test.tsx
Expected Results
Describe what you expected to happen.
The test should pass without any problems as it used to happen on react-native 0.63.4.
Snack, code example, screenshot, or link to a repository:
Please provide a Snack (https://snack.expo.io/), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem.
You may provide a screenshot of the application if you think it is relevant to your bug report.
Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve
What happens is actually the following error:
The text was updated successfully, but these errors were encountered: