-
Notifications
You must be signed in to change notification settings - Fork 2k
[react native] Namespace not marked type-only declare. #2400
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
Comments
Hi, I found the following solution.
Then I create, in the root of the project the file
And the file
At the moment I have no problem |
Hi @itachiuchiha91 thanks for letting us know. Is your project a typescript project? If so did you add Ideally you shouldn't need to transpile the typescript as the js is already bundled, but it looks like the resolver tries to load the typescript first. |
@caisq Just out of curiosity, do you know why compiled_api.ts is copied into dist when building tfjs-converter? https://github.com/tensorflow/tfjs/blob/master/tfjs-converter/package.json#L57 |
@itachiuchiha91 thank you for your solution. It worked for me like a charm. |
I had to add the following line to my tsconfig.json to prevent TypeError: {Module}.default is not a function errors
|
@NickRance Now I can go to sleep! heheheheh! Thank you a lot! |
The error message is asking you to add "declare" to the namespace. You can defined your namespace like so: |
Thanks, @jeff3dx. That solved a related issue I was having. |
TensorFlow.js version
1.3.2
TensorFlow.js react-native version
0.1.0-alpha.2
Browser version
react-native 0.59.8
expo sdk 35.0.0
expo version 3.7.1
Describe the problem or feature request
Hi, I follow the steps in the page https://github.com/tensorflow/tfjs/tree/master/tfjs-react-native for a expo managed app, but I get the following error
Code to reproduce the bug / link to feature request
These are the commands I've run
Added the lines in the App.js file
then
The text was updated successfully, but these errors were encountered: