Block-scoped declarations not yet supported outside strict mode

后端 未结 7 1634
小蘑菇
小蘑菇 2020-12-04 19:26

I\'m running Laravel 5.4 on my Homestead vagrant box. I\'ve installed all the npm dependencies with npm install command. That didn\'t produce a

7条回答
  •  长情又很酷
    2020-12-04 19:57

    Upgrading node package is the solution here. Adding altenative steps to upgrade node package as there is no need to download, install and manage node versions yourself. You can use a module called n to upgrade you node package in Mac/Ubuntu

    sudo npm install -g n
    sudo n stable
    

    This will install latest stable node package. You can run

    node --version
    

    If you are still seeing old version it might be directory issues where new package is installed. I had to create a symlink to make it work-

    sudo ln -s  /usr/local/n/versions/node/9.0.0/bin/node  /usr/local/bin/node
    

提交回复
热议问题