question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use of undeclared identifier 'jsi'; did you mean 'RNSkia::jsi'?

See original GitHub issue

I have just created a new RN project using:

npx react-native init App --template react-native-template-typescript

After adding react-native-skia and running a pod install, it seems that the iOS build fails with:

/node_modules/@shopify/react-native-skia/ios/RNSkia-iOS/SkiaManager.mm:37:34: Use of undeclared identifier 'jsi'; did you mean 'RNSkia::jsi'?
Screenshot 2022-06-23 at 12 19 50

I’m unsure if I’m missing something obvious - this is the first time I have tried this library -, but I wanted to report it here in case someone else runs into this.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

1reaction
hadnetcommented, Jun 29, 2022

Tried to install react-native-skia on RN 0.69 as well (yarn add @shopify/react-native-skia; cd ios && pod install), and I got this error

The following build commands failed:
        CompileC /Users/jon/Library/Developer/Xcode/DerivedData/ProjectName-gyiatrubjzhjbvdbweyubqraqudl/Build/Intermediates.noinde
x/Pods.build/Debug-iphonesimulator/react-native-skia.build/Objects-normal/x86_64/SkiaManager.o /Users/jon/ReactNativeProj/ProjectName/node_modules/@shopify/react-native-skia/ios/RNSkia-iOS/SkiaManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang
.1_0.compiler (in target 'react-native-skia' from project 'Pods')
(1 failure)

Opening Xcode I got same error of andreialecu, “Use of undeclared identifier ‘jsi’; did you mean ‘RNSkia::jsi’?” But I got another error “No member named ‘jsiNSkia’ in namespace ‘RNSkia’” and this can’t be resolved by Xcode.

Using Skia 0.1.133

NOTE: Ok, I was able to run the project and solve the issue as highlighted in “Added correct namespace”, just adding Facebook namespace, like this:

auto callInvoker = bridge.jsCallInvoker;
       facebook::jsi::Runtime* jsRuntime = (facebook::jsi::Runtime*)cxxBridge.runtime;
1reaction
vlaxiscommented, Jun 24, 2022

This also happened to me, using react-native 0.69. Blank project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Expo EAS build use of undeclared identifier 'Promise'
I am migrating my managed Expo React Native project to the EAS build ecosystem and am getting a strange error that I dont...
Read more >
issues to compile cpp code that uses cuda header
Hi, I try to compile a souce file that includes the "driver_types.h" header file from the latest cuda sdk. I get thisd error...
Read more >
I am having error while building skia by macos - Google Groups
src/codec/SkJpegCodec.cpp:301:58: error: use of undeclared identifier 'JCS_RGB565'; did you mean 'JCS_RGB'?
Read more >
Compiler Error C2065 - Microsoft Learn
The identifier is undeclared. If the identifier is a variable or a function name, you must declare it before it can be used....
Read more >
Use of undeclared identifier 'kAED… | Apple Developer Forums
I tested in 10.2.1 and it works. Make sure you add. import Cocoa. Posted 3 years ago by. Claude31.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found