実現したいこと
VSCode上でReactの開発をする
発生している問題・エラーメッセージ
「npm start」コマンドを打つと、以下のエラーメッセージが
出ます。
PS C:\react-apps> npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\react-apps/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\react-apps\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\owner\AppData\Local\npm-cache_logs\2022-05-08T02_43_03_530Z-debug-0.log
該当のソースコード
また、「react -v」と打つと、以下のエラーメッセージが出ます。
PS C:\react-apps> react -V
react: The term 'react' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
自分で調べたことや試したこと
Node.jsが入っているか、コマンドでバージョン確認
Reactが入っているか、コマンドでバージョン確認
React関連フォルダをCドライブに移動
使っているツールのバージョンなど補足情報
環境:
- VSCode ver 1.67.0
- Node.js 16.13.0
- OS Windouws_NT x64 10.0.22000
あなたの回答
tips
プレビュー