React: create-react-app fails with error “Cannot find module 'lodash'”

后端 未结 2 878
感情败类
感情败类 2021-01-13 15:54

I\'m learning React for the first time, and I\'m having a great deal of trouble even getting started with a demo app. When I run npx create-react-app I get the

相关标签:
2条回答
  • 2021-01-13 16:28

    did you try installing create-react-app? npm install -g create-react-app and then run create-react-app my-app

    0 讨论(0)
  • 2021-01-13 16:38

    I continued searching for similar problems that others have had, and someone suggested:

    npm cache clean --force 
    

    so I did that, then I did another:

    npm i 
    

    and ...

    npm i -g create-react-app 
    

    then the create-react-app command worked!!

    I hope this helps someone in the future.

    0 讨论(0)
提交回复
热议问题