Error: Cannot find module '../lib/utils/unsupported.js' while using Ionic

后端 未结 18 2988
悲哀的现实
悲哀的现实 2020-12-12 09:34

I always get this error message when I run \"Ionic start project name\":

Error message

Running command - failed![ERROR] An error occurred while run         


        
18条回答
  •  鱼传尺愫
    2020-12-12 10:17

    This may happen when the npm/lib folder got emptied for some reason (could also happen due to permission issues in the last usage).

    A reinstallation of the node could solve the issue (as stated on other answers here), but I would suggest using a wonderful tool called nvm (Node Version Manager), which is able to manage multiple version of node and npm - this is mostly useful on dev machines with more than one projects require different versions of node.

    When you install nvm, this message will go away and you will have the latest version of node and npm to use.

    In order to see the list of currently installed node versions in your nvm, just run:

    nvm list
    

    In order to install and use a new node version, run:

    nvm install 
    

    For example to install latest version of node 10.x, run:

    nvm install 10
    

    In order to switch to currently installed version, run:

    nvm use 
    

    In order to switch to system's original node version, just run:

    nvm use system
    

    Hope this helps.

    Good luck!

提交回复
热议问题