I write npm react-native init newApp but it returns a problem in this form.I downloaded the metro package (npm i metro) but it didn't fix the problem.Could this problem be due to missing any packages?
Error: Cannot find module './Bundler/util'
Require stack:
- C:\Users\kamra\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\metro\src\Assets.js
- C:\Users\kamra\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\metro\src\Server.js
- C:\Users\kamra\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\metro\src\shared\output\bundle.flow.js
- C:\Users\kamra\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\metro\src\shared\output\bundle.js
- C:\Users\kamra\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli-plugin-metro\build\commands\bundle\buildBundle.js
- C:\Users\kamra\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli-plugin-metro\build\commands\bundle\bundle.js
- C:\Users\kamra\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli-plugin-metro\build\commands\bundle\index.js
- C:\Users\kamra\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli-plugin-metro\build\commands\index.js
- C:\Users\kamra\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli-plugin-metro\build\index.js
- C:\Users\kamra\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli\build\commands\index.js
- C:\Users\kamra\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli\build\index.js
- C:\Users\kamra\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli\build\bin.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1039:15)
at Module._load (node:internal/modules/cjs/loader:885:27)
at Module.require (node:internal/modules/cjs/loader:1105:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (C:\Users\kamra\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\metro\src\Assets.js:14:32)
at Module._compile (node:internal/modules/cjs/loader:1218:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
at Module.load (node:internal/modules/cjs/loader:1081:32)
at Module._load (node:internal/modules/cjs/loader:922:12)
at Module.require (node:internal/modules/cjs/loader:1105:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\kamra\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\metro\\src\\Assets.js',
'C:\\Users\\kamra\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\metro\\src\\Server.js',
'C:\\Users\\kamra\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\metro\\src\\shared\\output\\bundle.flow.js',
'C:\\Users\\kamra\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\metro\\src\\shared\\output\\bundle.js',
'C:\\Users\\kamra\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\@react-native-community\\cli-plugin-metro\\build\\commands\\bundle\\buildBundle.js',
'C:\\Users\\kamra\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\@react-native-community\\cli-plugin-metro\\build\\commands\\bundle\\bundle.js',
'C:\\Users\\kamra\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\@react-native-community\\cli-plugin-metro\\build\\commands\\bundle\\index.js',
'C:\\Users\\kamra\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\@react-native-community\\cli-plugin-metro\\build\\commands\\index.js',
'C:\\Users\\kamra\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\@react-native-community\\cli-plugin-metro\\build\\index.js',
'C:\\Users\\kamra\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\@react-native-community\\cli\\build\\commands\\index.js',
'C:\\Users\\kamra\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\@react-native-community\\cli\\build\\index.js',
'C:\\Users\\kamra\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\@react-native-community\\cli\\build\\bin.js'
]
}
Node.js v18.13.0