We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
npx react-native@0.66.5 init RN0665 --version 0.66.5
yarn add ses
// index.js import 'ses'; // added import {AppRegistry} from 'react-native'; import App from './App'; import {name as appName} from './app.json'; lockdown({consoleTaming: 'unsafe'}); // added AppRegistry.registerComponent(appName, () => App);
// metro.config.js const {getDefaultConfig} = require('metro-config'); module.exports = (async () => { const { resolver: {sourceExts}, } = await getDefaultConfig(); return { transformer: { getTransformOptions: async () => ({ transform: { experimentalImportSupport: false, inlineRequires: true, }, }), }, resolver: { sourceExts: [...sourceExts, 'cjs'], }, }; })();
echo 'ses.cjs' > .babelignore
npx browserslist@latest --update-db (recommended)
npx browserslist@latest --update-db
yarn start --reset-cache
yarn start ios
Result: endojs/endo#659
Expectation: Same result as
curl -O https://npmfs.com/download/ses/0.18.1/dist/lockdown.umd.js
echo 'lockdown.umd.js' > .babelignore
import './lockdown.umd.js';
ses
ERROR TypeError: undefined is not a function (near '...globalThis.process.on...')
rn-nodeify
The text was updated successfully, but these errors were encountered:
SES installed via a pkg manager like npm or yarn won't be ignored by Babel in .babelignore
npm
yarn
.babelignore
Solution:
// babel.config.js module.exports = { ignore: [/ses\.cjs/], // added presets: ['module:metro-react-native-babel-preset'], };
Sorry, something went wrong.
eval
No branches or pull requests
npx react-native@0.66.5 init RN0665 --version 0.66.5
yarn add ses
echo 'ses.cjs' > .babelignore
npx browserslist@latest --update-db
(recommended)yarn start --reset-cache
yarn start ios
Result: endojs/endo#659
Expectation: Same result as
curl -O https://npmfs.com/download/ses/0.18.1/dist/lockdown.umd.js
echo 'lockdown.umd.js' > .babelignore
import './lockdown.umd.js';
instead ofses
npm pkgERROR TypeError: undefined is not a function (near '...globalThis.process.on...')
to tackle next (with e.g.rn-nodeify
)The text was updated successfully, but these errors were encountered: