Block-scoped declarations问题解决

在使用ubuntu运行Node项目的时候,出现这个报错。报错原因是node的版本过低(当时node的版本是4.6.0),更新node的版本可以解决这个问题。

 

 

 

 

 更新方法如下:

 

sudo apt-get update

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

sudo apt-get install -y nodejs

  

之后node -v检测版本是否更新就行。

 

 

 

posted @ 2020-12-08 14:05  ellenxx  阅读(1001)  评论(0编辑  收藏  举报