Ubuntu create-react-app fails with permission denied

前端 未结 6 2066
独厮守ぢ
独厮守ぢ 2021-02-08 12:32

I\'m getting a weird error:

Unhandled rejection Error: EACCES: permission denied, mkdir \'/home/ubuntu/.npm/_cacache/index-v5/14/36\'atus

I jus

6条回答
  •  甜味超标
    2021-02-08 13:13

    New way of installation will resolve the issue.

    According to the latest react documentation follow below steps to create react app

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

    Note(from ReactJS Team): If you've previously installed create-react-app globally via npm install -g create-react-app, we recommend you uninstall the package using npm uninstall -g create-react-app to ensure that npx always uses the latest version.

    Refer official documentation: https://facebook.github.io/create-react-app/docs/getting-started

提交回复
热议问题