##【問題詳細】
create-react-appでの環境構築を行っています。
Visual Studio Code(以下VSCode)でWSLのターミナルを開き、
npm run build
とコマンドを打ち、ビルドフォルダを作成しようとしたところ
以下のようなエラーが出ました。
ファイルやディレクトリが存在しない、ということですが、Ubuntu初心者なので
具体的にどうやってファイル名やパス名を正せばいいのかわかりません。
解決法が分かる方がいればご教授願います。
##【エラー】
Ubuntu
pm ERR! code ENOENT npm ERR! syscall open npm ERR! path /home/tatsumip/TatsumiProject/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/home/tatsumip/TatsumiProject/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! /home/tatsumip/.npm/_logs/2020-10-23T11_59_27_753Z-debug.log
##【PC環境】
・Windows10
・WSL
・Linux
・Ubuntu
・bash
・curl v7.68
・nodebrew v8.94
・Node v14.04
・create-react-app
・VisualStuidoCode v1.501
##【試したこと】
・npm install -g create-react-appを実行すると、以下のようなエラーが出ました。
ubuntu
npm WARN checkPermissions Missing write access to /usr/local/lib npm ERR! code EACCES npm ERR! syscall access npm ERR! path /usr/local/lib npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, access '/usr/local/lib' npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib'] npm ERR! stack: npm ERR! 'Error: EACCES: permission denied, access \'/usr/local/lib\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib' } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator. npm ERR! A complete log of this run can be found in: npm ERR! /home/tatsumip/.npm/_logs/2020-10-23T12_15_48_139Z-debug.log
まだ回答がついていません
会員登録して回答してみよう