Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug: Restricted in strict mode error #4312

Closed
1 task done
punndcoder28 opened this issue Nov 8, 2022 · 10 comments
Closed
1 task done

馃悰 Bug: Restricted in strict mode error #4312

punndcoder28 opened this issue Nov 8, 2022 · 10 comments

Comments

@punndcoder28
Copy link

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Steps to reproduce ?

I installed the nocodb-sdk and when trying to initialise the module by importing import { Api } from 'nocodb-sdk', it throws an error saying Restricted in strict mode.

Steps:

  1. npm i nocodb-sdk
  2. import { Api } from 'nocodb-sdk'

Desired Behavior

The Api object should imported successfully allowing us to initialise the project and get data from the tables

Project Details

Node: **v12.22.12**
Arch: **x64**
Platform: **linux**
Docker: **false**
Database: **pg**
ProjectOnRootDB: **false**
RootDB: **pg**
PackageVersion: **0.98.1**

Attachements

Screenshot_20221108-122802

@punndcoder28
Copy link
Author

There seems to be similar reports from axios library but can confirm that even after trying the suggested fixed mentioned on that thread, I was not able to resolve the issue

@wingkwong
Copy link
Member

I couldn't produce the issue on the latest version (0.98.4). Can you confirm it on your machine?

@wingkwong wingkwong added the 馃弻锔廠tatus: Action Needed Some actions are needed to be done label Nov 14, 2022
@punndcoder28
Copy link
Author

Screenshot 2022-11-16 at 5 29 42 PM

I am using the following package versions

nocodb-sdk: ^0.98.4
axios: ^1.1.3

Could you let me know your dependency versions? As soon as I disable hermes, the project works as expected.

@wingkwong
Copy link
Member

@punndcoder28

In nocodb-sdk, we are using axios@^0.21.1. Is there any reason to use axios: ^1.1.3? It seems that the error thrown from axios since 1.0.0. If it's really necessary to use a latest version of axios. They've released axios@1.2.0-alpha.1 which resolved the problem. Can you help confirm if bumping to axios@1.2.0-alpha.1 resolves the problem?

@punndcoder28
Copy link
Author

Sorry for the late reply. Tried with axios@1.2.0-alpha.1 but to no avail unless I disable hermes in the project for android. We started off with axios: 1.0.0 and downgrading the dep might cause other features on the project to break. As a result I am refraining from doing that.

@wingkwong
Copy link
Member

Got it. Could you share how did you disable hermes? and have you removed node_modules before trying axios@1.2.0-alpha.1?

@punndcoder28
Copy link
Author

Yes. I deleted node_modules before installing the alpha version for axios. To disable hermes, I did so in the android/app/build.gradle file.

@punndcoder28
Copy link
Author

Hi @wingkwong , any updates on the issue?

@wingkwong
Copy link
Member

hermes is a JS engine for React Native applications. Some people have pointed out it is due to axios. If the root cause is from axios, there is not much we can do. I've seen they released v1.2.0. You may give it a try.

@wingkwong wingkwong removed the 馃弻锔廠tatus: Action Needed Some actions are needed to be done label Nov 29, 2022
@dstala
Copy link
Member

dstala commented Nov 3, 2023

closing this thread. if you are still facing issue, help us with more details.

@dstala dstala closed this as completed Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants