Giter Site home page Giter Site logo

leetcode-desktop's Introduction

leetcode-desktop (还是网页好用)

这份文档将帮助你在 ubuntu16.04_x64 位的终端上搭建连接 leetcode.com 的服务

1 安装 npm 和 nodejs

sudo apt install npm  
npm -v # 查看版本
sudo npm install -g n # 安装用于安装 nodejs 的模块 n  
sudo n stable # 稳定版本的 nodejs

如果报错:

sudo npm install -g n  
/usr/local/lib/node_modules/npm/bin/npm-cli.js:79  
      let notifier = require('update-notifier')({pkg})  
      ^^^  

SyntaxError: Block-scoped declarations (let, const, function, class)  
not yet supported outside strict mode  
    at exports.runInThisContext (vm.js:53:16)  
    at Module._compile (module.js:374:25)  
    at Object.Module._extensions..js (module.js:417:10)  
    at Module.load (module.js:344:32)  
    at Function.Module._load (module.js:301:12)  
    at Function.Module.runMain (module.js:442:10)  
    at startup (node.js:136:18)  
    at node.js:966:3  

则如下操作:

cd /usr/local/lib/node_modules  
mv npm/ /tmp/usr_local_lib_node_modules_npm  

然后重新执行

sudo npm install -g n # 安装用于安装 nodejs 的模块 n  
sudo n stable

不要按照如下方式安装

sudo apt install nodejs-legacy  
sudo apt install npm  

2 安装leetcode-cli

先检查 npm, node, 出现版本号则继续

npm -v  
node -v  

可以从 npm, github, source, docker 安装,建议从源码安装

git clone http://github.com/skygragon/leetcode-cli  
cd leetcode-cli  
sudo ./bin/install  
leetcode version  

感谢前人的工作

leetcode-desktop's People

Contributors

stormchasingg avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.