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

前端 未结 17 2453
终归单人心
终归单人心 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:38

    app-scripts currently compatible with node 6 and 7. İf you installed node 8, then please uninstall and install node 6 stable version. This solved error and now i can use ionic 3, angular 4 . Take care!

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

    I ran into the same issue and i had problems fixing it. However i update my app scripts npm install -g @ionic/app-scripts@latest --save-dev to the latest version and my problem was solved

    npm install -g @ionic/app-scripts@latest --save-dev

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

    I tried every non-downgrade solution mentioned in this thread, in all kinds of ways and none of them worked. With nothing left to lose, I went down the downgrade route (I used sudo apt-get purge --auto-remove nodejs to remove previous 8.x version and then installed the last stable ver on the 6.x branch using the nodesource ppa).

    Still got the same errors trying to run in the original project folders, but then I created a new project and ionic serve worked just fine in that space.

    FWIW, I did not need to run npm update or npm i @ionic/app-scripts afterwards, but I did find it necessary to adopt the habit of running commands with sudo in front (or you sudo -s into root account).

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

    Just open a new terminal window/session. I could not figure it out, but it's probably related to env.

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

    You must create the project as administrator if you have mac or linux uses sudo, if you have windows run the console as administrator and create the project

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

    My issue was solved after run this script:

    npm i @ionic/app-scripts
    
    0 讨论(0)
提交回复
热议问题