I dont know what happened. I tried to implement Kaboom and then WebView. Both lead me to this error:
node_modules/react-native-webview/ index.js: Cannot find module 'babel-plugin-transform-class-statick-block'
package.json (only the babel part)
"dependencies": {
"@babel/plugin-transform-class-static-block": "^7.20.0",
"@babel/preset-env": "^7.20.0", //only installed in case that solves the problem (it didn't)
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/plugin-proposal-class-static-block": "^7.20.0",
"@babel/plugin-transform-class-static-block": "^7.20.0",
"@babel/preset-env": "^7.20.0"
},
babel.config.js
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo', 'babel-preset-env'], //babel-preset-env only installed because I thought it maybe solves the problem (it didn't)
plugins: [
'babel-plugin-transform-class-static-block',
'@babel/plugin-transform-class-static-block' //incase I wrote it wrong the first time
],
};
};