node.js - 为什么 LeetCode 扩展无法在 ubuntu 16.04 的 Visual Studio Code 中运行?
问题描述
我已经成功安装了 LeetCode 扩展和node.js,然后在 LeetCode 扩展中点击 Switch Endpoint 或 Sign in 的图标,报错:</p>
找不到命令“leetcode.toggleLeetCodeCn”
或者
找不到命令“leetcode.signin”。
我曾尝试更改nodejs和 LeetCode 扩展的版本,但没有奏效。当我重新加载VSCode窗口时,它会报告这个错误:
LeetCode 扩展需要在环境路径中安装 Node.js
然后我按照提示打开输出通道,OUTPUT菜单显示:
/bin/sh: 1: /usr/local/bin: Permission denied 错误:环境不符合要求。有没有人遇到过这个问题?请帮我!谢谢。
我的软件版本:
Ubuntu:16.04 x64
VS代码:1.52.1 x64
我尝试过的nodejs版本:8.9.3/15.6.0/15.10.0
我尝试过的 leetcode 扩展版本:0.16.2/0.17.0
解决方案
This error also occurs to me. The leetcode plugin worked well in the past weeks, but today, all of sudden, it stopped working
I tried
- re-intall leetcode cli globally
- add source .bash_profile and .bashrc to my zshrc
- update node
However, none of them works.
The problem was resolved by doing the follow
- disable leetcode plugin
- reload
- enable leetcode plugin
推荐阅读
- sharepoint - Sharepoint 2013 Wiki 历史页面始终显示添加的第一个单词
- python - Python-Mysql插入查询
- html - 无法对齐连续 3 个元素。一个应该在左边,其余的应该居中
- amazon-s3 - Kafka S3 源连接器
- python - 我的 on_message 功能不再起作用
- elasticsearch - Elasticsearch 未在云 URL 中打开
- php - 如何在docker容器中访问主机的mongo db
- python - 将 pandas df 转换为嵌套字典
- angular - 使用角度重定向问题的 Microsoft 多因素身份验证
- javascript - 如何通过特定索引获取未来的项目和过去的项目,比如在轮播中