You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.
> dts-gen -m aws-amplify-react-native
Unexpected crash! Please log a bug with the commandline you specified.
C:\...\node_modules\aws-amplify-react-native\dist\index.js:14
import { default as AmplifyCore, I18n } from 'aws-amplify';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:1067:16)
at Module._compile (internal/modules/cjs/loader.js:1115:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1040:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (C:\Users\...\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\run.js:58:67)
at Module._compile (internal/modules/cjs/loader.js:1151:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
The text was updated successfully, but these errors were encountered:
The require hook will bind itself to node's require and automatically compile files on the fly.
Run npm install @babel/core @babel/register --save-dev
Add to the top of lib/run.js
require("@babel/register")({ignore: [],presets: ["INSERT YOUR PRESET HERE"]});
I used module:metro-react-native-babel-preset as my preset.
Run npm run build
Run npm link
Run dts-gen -m aws-amplify-react-native
However, it kept on wanting me to install more and more packages, aws-amplify-react-native -> aws-amplify -> react-native.
Finally, it crashed with an Invariant Violation: __fbBatchedBridgeConfig is not set, cannot invoke native modules at invariant error.
This seems to be too complex a use-case for dts-gen so I'm going to give up for now.
The text was updated successfully, but these errors were encountered: