@sharp231

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

Node.jsを触ったらエラーがでたのでヘルプをお願いします

Q&A

Closed

解決したいこと

ReactNativeをアップデートしたくてNode.jsを触ったらエラーがでたからヘルプをお願いします
ReactNativeの起動までしたいです

発生している問題・エラー

error Cannot find module 'C:\Users\\node_modules\react-native\package.json'
Require stack:
- C:\Users\\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli\build\commands\upgrade\upgrade.js
- C:\Users\\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli\build\commands\index.js
- C:\Users\\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli\build\index.js
- C:\Users\\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli\build\bin.js.
Error: Cannot find module 'C:\Users\\node_modules\react-native\package.json'
Require stack:
- C:\Users\\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli\build\commands\upgrade\upgrade.js
- C:\Users\\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli\build\commands\index.js
- C:\Users\\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli\build\index.js
- C:\Users\\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli\build\bin.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.upgrade [as func] (C:\Users\\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli\build\commands\upgrade\upgrade.js:323:7)
    at Command.handleAction (C:\Users\\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\@react-native-community\cli\build\index.js:142:23)
    at Command.listener [as _actionHandler] (C:\Users\\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\commander\lib\command.js:482:17)
    at C:\Users\\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\commander\lib\command.js:1264:65
    at Command._chainOrCall (C:\Users\\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\commander\lib\command.js:1158:12)
    at Command._parseCommand (C:\Users\\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\commander\lib\command.js:1264:27)
info Run CLI with --verbose flag for more details.

または、問題・エラーが起きている画像をここにドラッグアンドドロップ


### 自分で試したこと
https://qiita.com/taisei-ide-0123/items/0edbc43cbe226fb8ef90

https://reactnative.dev/docs/environment-setup

https://prograshi.com/framework/nodejs/upgrade-or-change-node-version-in-windows/
Node.jsの再インストール

WindowsでAndroidStudioを入れています
AndroidStudioと環境パスは何も触っていません
ReactNativeのAwesomeProjectは再作成するために削除しております

色んなところを改善しようとしましたがReactNativeを起動することもできなくなったので協力お願いします
0 likes

1Answer

Your answer might help someone💌