OSはAmazon Linux2です。
下記エラーより、create-react-appのインストールができないのですが、
どのようにして対応すればよろしいでしょうか?
[ec2-user@ip-172-31-27-7 ~]$ create-react-app my-app -bash: create-react-app: command not found [ec2-user@ip-172-31-27-7 ~]$ npm install -g create-react-app npm WARN checkPermissions Missing write access to /usr/lib/node_modules npm ERR! code EACCES npm ERR! syscall access npm ERR! path /usr/lib/node_modules1 npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules' npm ERR! { Error: EACCES: permission denied, access '/usr/lib/node_modules' npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/lib/node_modules\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/lib/node_modules' } 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/ec2-user/.npm/_logs/2020-08-26T14_23_42_035Z-debug.log
たぶんだけど権限の問題なんだから -g じゃなくてローカルにインストールすりゃいいだけでは。
回答1件
あなたの回答
tips
プレビュー