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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@rtk-query/codegen-openapi: Cannot use import statement outside a module #4596

Open
vladinko0 opened this issue Sep 3, 2024 · 0 comments
Open

Comments

@vladinko0
Copy link

"@rtk-query/codegen-openapi": "^1.2.0",
"react-native-localize": "^3.0.2",

In my project I am using this code:

import * as RNLocalize from 'react-native-localize';
const locales = RNLocalize.getLocales();

It causes this error:

/Users/user/Projekty/proj/node_modules/react-native/index.js:14
import typeof AccessibilityInfo from './Libraries/Components/AccessibilityInfo/AccessibilityInfo';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1178:20)
    at Module._compile (node:internal/modules/cjs/loader:1220:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Object.require.extensions.<computed> [as .js] (/Users/user/Projekty/proj/node_modules/ts-node/src/index.ts:1608:43)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Function.Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/Users/user/Projekty/proj/node_modules/react-native-localize/dist/commonjs/NativeRNLocalize.ts:2:1)
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

1 participant