
the code to compile
the bundler crashes
did you run packager with --reset-cache?
yes! i did
still doesn't work, I don't know what to do anymore
Then it should work. Without any code we won't be able to help you, unfortunately.
that's the bable code
/* eslint-disable func-names */
const rootImportOpts = [
{
rootPathSuffix: './src',
rootPathPrefix: 'src',
},
{
rootPathSuffix: './src/screens',
rootPathPrefix: 'screens',
},
{
rootPathSuffix: './src/shared-components',
rootPathPrefix: 'shared-components',
},
{
rootPathSuffix: './src/utils',
rootPathPrefix: 'utils',
},
{
rootPathSuffix: './assets',
rootPathPrefix: 'assets',
},
{
rootPathSuffix: './src/context',
rootPathPrefix: 'context',
},
];
// require('babel-core').transform('code', { plugins: ['babel-plugin-rewire'] });
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo', '@babel/preset-typescript'],
sourceMaps: true,
plugins: [
[
'babel-plugin-root-import',
{
paths: rootImportOpts,
},
],
// '@babel/proposal-class-properties',
// '@babel/proposal-object-rest-spread',
'transform-class-properties',
// ['babel-plugin-rewire'],
'react-native-reanimated/plugin',
],
};
};
if I remove 'react-native-reanimated/plugin', the error doesn't show but reanimated also don't work, at least the version 2 the version one still works fine
could you try the reanimated plugin to be the very first one one the list?
What is your node version? Try using node 12
it's 10.15.3
i tried the reanimated-2-playground
git checkout [email protected]:software-mansion-labs/reanimated-2-playground.git
and got the same error
I think I saw someone having this problem and upgrading node version helped
It worked! thanks, man!!!
they could add to the documentation that requires node 12 or above!
Most helpful comment
I think I saw someone having this problem and upgrading node version helped