SyntaxError: Use of const in strict mode?

前端 未结 6 1565
礼貌的吻别
礼貌的吻别 2020-11-29 04:00

I am trying to login on facebook.com with selenium-webdriver.

var webdriver = require(\'selenium-webdriver\'),
    By = require(\'selenium-webdriver\').By,
          


        
相关标签:
6条回答
  • 2020-11-29 04:18

    n stable wouldn't do the trick for me. On the other hand,

    nvm install stable
    

    That actually got me to last nodejs version. Apparently n stable won't get pass v0.12.14 for me. I really don't know why.

    Note: nvm is Node Version Manager, you can install it from its github page. Thanks @isaiah for noting that nvm is not a known command.

    0 讨论(0)
  • 2020-11-29 04:20

    Updating nodejs solved the issue:

    npm cache clean -f
    sudo npm install -g n
    sudo n stable
    node --version
    node app.js
    

    You have to run the second and third command as root/administrator.

    0 讨论(0)
  • 2020-11-29 04:24

    That error means your node's publish is low than the need. carefully to update the node of your computer.

    0 讨论(0)
  • 2020-11-29 04:25

    For me it was more simple to solve, just going to the Node web site, get and install the LTS version.

    0 讨论(0)
  • 2020-11-29 04:34

    Update your node and it will resolve this problem.

    0 讨论(0)
  • 2020-11-29 04:45

    Updating NodeJS solves this problem. But, after running sudo npm install -g n you might get following error:

    npm: relocation error: npm: symbol SSL_set_cert_cb, version libssl.so.10 not defined in file libssl.so.10 with link time reference
    

    In order to overcome this error, try upgrading openssl using the below command:

    sudo yum update openssl
    
    0 讨论(0)
提交回复
热议问题