Error: Cannot find module '@ionic/app-scripts'

前端 未结 17 2452
终归单人心
终归单人心 2020-12-13 02:24

I\'m new to Ionic. I was following the Ionic documentation \"get started\", created a project sample named \"super\". The problem is that when I run the command line i

相关标签:
17条回答
  • 2020-12-13 02:53

    do not downgrade the node version, update the version of "app-scripts":

    To get the latest @ionic/app-scripts, please run:

    npm install @ionic/app-scripts@latest --save-dev
    
    0 讨论(0)
  • 2020-12-13 02:53

    Delete node_modules and package-lock.json

    rm -rf node_modules package-lock.json
    npm install
    

    Reference: https://github.com/ionic-team/ionic-cli/issues/3399

    0 讨论(0)
  • 2020-12-13 02:55

    None of the options worked for me. But I could make it work by updating node with npm update After this, the problem was solved and the application started. Good Luck.

    0 讨论(0)
  • 2020-12-13 02:55

    I had the same problem and here is what worked for me

    I was trying to run the program using VSCode terminal, Instead I used the windows cmd and it ran perfectly. I think the error is in VSCode terminal, it cannot identify the app-scripts module inside the project. Maybe it will be fixed in a later update.

    0 讨论(0)
  • 2020-12-13 02:58

    Try installing app-script from npm

    npm i @ionic/app-scripts

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