-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Description
Hello there! We are trying to use this monorepo to have a project with RN for mobile part and Next.js + NativeBase for the web. The issue that after we installed NativeBase in monorepo we got an errors and we think that the problem is lying somewhere in monorepo setup. BTW RN + NativeBase in monorepo works fine. To understand the issue we also tryed to run a new project (outside monorepo) with Next+NativeBase setup and thats works fine! Could you please give us a hint how to solve that issue, will be really appreciate for this
Error looks like:
This is our next config, with integrated config from NativeBase docs (https://docs.nativebase.io/install-next)
const withImages = require("next-images");
const withFonts = require("next-fonts");
const withTM = require("next-transpile-modules")([
"react-native-web",
"native-base",
]);
const { withExpo } = require("@expo/next-adapter");
module.exports = withTM(
withExpo(
withImages(
withFonts({
typescript: {
ignoreBuildErrors: true,
},
experimental: {
externalDir: true,
},
images: {
disableStaticImages: true,
},
webpack: (config, options) => {
config.module.rules.push({
test: /\.mobile.(ts|tsx)$/,
loader: "ignore-loader",
});
if (options.isServer) {
config.externals = [
"react",
"react-native-web",
...config.externals,
];
}
config.resolve.alias["react"] = path.resolve(
__dirname,
".",
"node_modules",
"react"
);
config.resolve.alias["react-dom"] = path.resolve(
__dirname,
".",
"node_modules",
"react-dom"
);
config.resolve.alias["react-native-web"] = path.resolve(
__dirname,
".",
"node_modules",
"react-native-web"
);
return config;
},
})
)
)
);
### INFORMATION
- We try to use 11.x.x and 12.0.4 next versions (Because of expo webpack5 support we tryed a different next versions)
- To integrate NativeBase we create a new directory(inside monorepo) and install NextJS with NativeBase (https://docs.nativebase.io/install-next) from scratch - not work
- Also tryed to install NativeBase into existing NextJS project - got the same errors as for step 2
fedarenchyk, DiagoSmith, markwindsorr and flexbox
Metadata
Metadata
Assignees
Labels
No labels
