You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
configuration.module.rules[1].oneOf[2].include should be one of these:
RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? } | [RegExp |
string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? }]
-> One or multiple rule conditions
Details:
configuration.module.rules[1].oneOf[2].include[1]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/app/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[2]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/browser-ext/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[3]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/electron/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[4]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/macos/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[5]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/mobile/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[6]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/next/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[7]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/tv/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[8]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/web/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[9]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/windows/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[1]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/app/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[2]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/browser-ext/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[3]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/electron/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[4]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/macos/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[5]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/mobile/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[6]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/next/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[7]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/tv/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[8]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/web/" is not an absolute path!
configuration.module.rules[1].oneOf[2].include[9]: The provided value "C:/Projects/react-native-universal-monorepo-master/packages/windows/" is not an absolute path!
I could not find solutions myself. Perhaps the solution is somewhere here?:
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.
RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? } | [RegExp |
string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? }]
-> One or multiple rule conditions
Details:
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!
The text was updated successfully, but these errors were encountered: