mmazzarolo / react-native-universal-monorepo

React Native boilerplate supporting multiple platforms: Android, iOS, macOS, Windows, web, browser extensions, Electron.
MIT License
1.7k stars 150 forks source link

Webpack has been initialised using a configuration object that does not match the API schema #55

Open phGitHubAcnt opened 9 months ago

phGitHubAcnt commented 9 months ago

Hi all! I'm just starting with react-native. I installed a repo on all the instructions. However, when starting PS C:\Projects\react-native-universal-monorepo-master> yarn web:start An error arises:

Failed to compile. Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

I could not find solutions myself. Perhaps the solution is somewhere here?:

file get-webpack-tools.js : const workspaces = getWorkspaces({ cwd }); function enableWorkspacesResolution(webpackConfig) { const babelLoader = webpackConfig.module.rules[1].oneOf.find((rule) => rule.loader.includes("babel-loader") ); babelLoader.include = Array.isArray(babelLoader.include) ? babelLoader.include : [babelLoader.include]; for (const workspace of workspaces) { babelLoader.include.push(workspace); }

file get-workspaces.js : const monorepoRoot = getMonorepoRoot({ cwd }); const packageJson = require(path.join(monorepoRoot, "package.json"));

Thanks!

msridar commented 5 months ago

Any update on this issue ?