Alessandro Carella
Alessandro Carella

Reputation: 41

Errors when running npm install -g create-react-app in ubuntu 20.04

So i'm trying to install react native in ubuntu 20.04, and i'm following this guide https://www.techomoro.com/install-and-setup-a-react-app-on-ubuntu/ , but when running "-g create-react-app" the terminal gives me these problems https://i.sstatic.net/sSlIp.jpg , how do i solve them? i have node and npm installed (see the picture)

Upvotes: 0

Views: 932

Answers (3)

Arsan
Arsan

Reputation: 9

This seems like a an administrative access issues. Trying running:

    $sudo npx create-react-app my-app

It will ask you for the administrators password, fill that in and it should be up and running.

Upvotes: 0

Burak Yücel
Burak Yücel

Reputation: 313

You npm version is suitable for this:

npx create-react-app your-app-name

npx command uses create-react-app without downloading it as global.

If you already added the create-react-app globally, uninstall it first.

Upvotes: 1

shravan20
shravan20

Reputation: 56

#issue with npm

Try following command,

npx install create-react-app -g 
npx create-react-app my-app
cd my-app
npm start

Sometimes the npm install doesn't work.

https://create-react-app.dev/docs/getting-started/

Upvotes: 0

Related Questions