Ionic serve not working in Ionic 3

前端 未结 20 611
眼角桃花
眼角桃花 2021-01-16 23:06

My Ionic info:

cli packages: (/usr/lib/node_modules)

@ionic/cli-utils  : 1.9.2
ionic (Ionic CLI) : 3.9.2

global packages:

Cordova CLI : 7.0.1 

local pack         


        
20条回答
  •  北荒
    北荒 (楼主)
    2021-01-16 23:43

    My answers works. My machine is also having a different package of Node which I forgot about in the first place.

    So I've removed node_modules using:

    sudo rm -rf /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules
    sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node.1 /usr/local/lib/dtrace/node.
    

    To make things less complicated with all cli - head up back https://nodejs.org/ and install back the LTS package

    Uninstall Node from brew
    re-install node.js using conventional way using the installer

提交回复
热议问题