Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing on Ubuntu 19.10 #31

Closed
akinsho opened this issue Nov 2, 2019 · 23 comments
Closed

Error installing on Ubuntu 19.10 #31

akinsho opened this issue Nov 2, 2019 · 23 comments

Comments

@akinsho
Copy link

akinsho commented Nov 2, 2019

Firstly this is such an amazing plugin 🚀 thanks for building it 👍

I've tried it on a macbook and it installs and works fine without any issues, but I tried installing it on a laptop using ubuntu 19.10 and I'm getting errors trying to install it.

## versions

vim version: NVIM v0.5.0-dev
node version: v12.13.0
coc.nvim version: 0.0.74
term: tmux-256color
platform: linux
[coc.nvim] Installed extension: coc-explorer
[coc.nvim] Error on load extension coc-explorer from /home/username/.config/coc/extensions/node_modules/coc-explorer/lib/index.js: Error: Cannot find module 'trash'
Require stack:
- /home/username/.config/coc/extensions/node_modules/coc-explorer/lib/index.js
- /home/username/.config/coc/extensions/node_modules/coc-explorer/lib/index.js

I went into the coc-explorer directory to try and see what happens if I add the trash module manually and I get

Insufficient number of arguments or no entry found.
Alternatively, run 'webpack(-cli) --help' for usage info.

Hash: 9cd1ba0f17437bf8135b
Version: webpack 4.41.2
Time: 24ms
Built at: 11/02/2019 10:52:26

ERROR in Entry module not found: Error: Can't resolve './src' in '/home/username/.config/coc/extensions/node_modules/coc-explorer'

Not sure if this is the real underlying error or just a different thing. I've tried debugging this myself but I'm not very familiar with how coc extensions work, I'd appreciate any help

@weirongxu
Copy link
Owner

Try uninstall coc-explorer and reinstall it. if it still the same error, you can try to execute npm install trash --ignore-scripts in the coc-explorer directory.

@akinsho
Copy link
Author

akinsho commented Nov 3, 2019

That worked 👍 @weirongxu, I ended up running npm install --ignore-scripts to get all the dependencies, since it wasn't just trash missing. Is there away to avoid having to manually install dependencies for this extension on ubuntu.

Looks like the webpack setup doesn't work on ubuntu for some reason 😕

@weirongxu
Copy link
Owner

I think it may be problems with your network, because I can't reproduce it on ubuntu.

Looks like the webpack setup doesn't work on ubuntu for some reason 😕

It seems that prepare scripts will prevent install trash manually, I will remove it.

@akinsho
Copy link
Author

akinsho commented Dec 22, 2019

@weirongxu just a heads up but this error seems to still occur so whenever I have to re-install this extension on ubuntu I still get the same error unless I use --ignore-scripts should there be a yarn install step at some point before prepare is run. Also I think npm no longer supports prepublish which is what commit 2221a5b changed this to

@weirongxu
Copy link
Owner

I still can't reproduce, this is my CocInfo

## versions

vim version: NVIM v0.3.8
node version: v12.13.0
coc.nvim version:0.0.74-bc017b02e6
term: xterm
platform: linux

## Messages
[coc.nvim] Installed extension: coc-explorer
## Output channel: explorer

@weirongxu
Copy link
Owner

# cat /etc/os-release
NAME="Ubuntu"
VERSION="19.10 (Eoan Ermine)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 19.10"
VERSION_ID="19.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=eoan
UBUNTU_CODENAME=eoan

@akinsho
Copy link
Author

akinsho commented Dec 23, 2019

@weirongxu my CocInfo shows

## versions

vim version: NVIM v0.5.0-dev
node version: v12.14.0
coc.nvim version: 0.0.74
term: tmux-256color
platform: linux

## Messages
"scheduling/basic.go" 129L, 3547C
vim-go: initializing gopls
vim-go: initialized gopls
[coc.nvim] Error on load extension coc-explorer from /home/akin/.config/coc/extensions/node_modules/coc-explorer/lib/index.js: Error: Cannot find module 'trash'
Require stack:
- /home/akin/.config/coc/extensions/node_modules/coc-explorer/lib/index.js
- /home/akin/.config/coc/extensions/node_modules/coc-explorer/lib/index.js
[coc.nvim] Command: explorer not found
## Output channel: git

and os details

cat /etc/os-release
NAME="Ubuntu"
VERSION="19.10 (Eoan Ermine)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 19.10"
VERSION_ID="19.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=eoan
UBUNTU_CODENAME=eoan

It maybe is an issue with how my npm/yarn is installed, although I haven't had any issues with anything else 😕

@weirongxu
Copy link
Owner

weirongxu commented Dec 24, 2019

It's weird 😥, Did you configured .npmrc?

My npm version:

# npm --version
6.12.0

@akinsho
Copy link
Author

akinsho commented Dec 24, 2019

My version is 6.12.1 I haven't changed my .npmrc
One thing that is a little confusing is that the webpack command fails because the entry point is missing. When I check the contents of /home/username/coc/extensions/node_modules/coc-explorer/ most of the files in this repo aren't there. There is no webpack.config.js no /src directory etc.

I'm not sure what the setup should be but looking at some of the other coc extensions they all have ./lib dir which I guess is where the typescript stuff is. I'm not sure exactly what is happening but I think the extension might not be getting setup correctly with all the files when I download it 🤔

EDIT: the directory for coc-explorer only contains an autoload dir, history.json, node_modules, package.json and a readme

@weirongxu
Copy link
Owner

There is no webpack.config.js no /src directory etc.

Because the published script has been compiled by webpack, the /src and /webpack.config.js is no longer needed.

@akinsho
Copy link
Author

akinsho commented Dec 24, 2019

This might be me missing something but in that case should there not be a built version of the extension in the directory somewhere?, from what I can see there is no javascript file in the directory now

coc-explorer-debug

When I run npm install without --ignore-scripts I get the webpack error looking for the entry point 🤕

@weirongxu
Copy link
Owner

I'm not sure exactly what is happening but I think the extension might not be getting setup correctly with all the files when I download it thinking

I only include there two directories..

"files": [
"lib",
"autoload"
],

The error you showing, should just be unable to install trash module

@weirongxu
Copy link
Owner

weirongxu commented Dec 24, 2019

This might be me missing something but in that case should there not be a built version of the extension in the directory somewhere?, from what I can see there is no javascript file in the directory now

You're missing the lib folder..

When I run npm install without --ignore-scripts I get the webpack error looking for the entry point

Can you show me the package.json?

@akinsho
Copy link
Author

akinsho commented Dec 24, 2019

coc-explorer-debug-2

{
  "name": "coc-explorer",
  "version": "0.2.8",
  "description": "explorer for coc.nvim",
  "main": "lib/index.js",
  "types": "lib/index.d.ts",
  "repository": "git@github.com:weirongxu/coc-explorer.git",
  "author": "Weirong Xu <weirongxu.raidou@gmail.com>",
  "publisher": "weirongxu",
  "homepage": "https://github.com/weirongxu/coc-explorer",
  "license": "MIT",
  "engines": {
    "coc": "^0.0.71"
  },
  "files": [
    "lib",
    "autoload"
  ],
  "keywords": [
    "coc.nvim",
    "explorer"
  ],
  "activationEvents": [
    "*"
  ],
  "contributes": {
    "commands": [
      {
        "title": "Open explorer",
        "command": "explorer"
      }
    ],
    "configuration": {
      "type": "object",
      "title": "Explorer",
      "properties": {
        "explorer.keyMappingMode": {
          "description": "Keymapping mode",
          "enum": [
            "none",
            "default"
          ],
          "default": "default"
        },
        "explorer.keyMappings": {
          "description": "Custom keymappings",
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "enum": [
                  false
                ]
              }
            ]
          },
          "default": {}
        },
        "explorer.position": {
          "description": "Explorer position",
          "enum": [
            "left",
            "right",
            "tab"
          ],
          "default": "left"
        },
        "explorer.width": {
          "description": "Explorer window width for open in left or right side",
          "type": "number",
          "default": 40
        },
        "explorer.toggle": {
          "description": "Close the explorer if it exists",
          "type": "boolean",
          "default": true
        },
        "explorer.autoExpandSingleNode": {
          "description": "Automatically expand next node when it's a single node",
          "type": "boolean",
          "default": true
        },
        "explorer.autoCollapseChildren": {
          "description": "Automatically collapse children",
          "type": "boolean",
          "default": true
        },
        "explorer.activeMode": {
          "description": "Render explorer when after open or save buffer",
          "type": "boolean",
          "default": true
        },
        "explorer.quitOnOpen": {
          "description": "quit explorer when open action",
          "type": "boolean",
          "default": false
        },
        "explorer.openAction.strategy": {
          "description": "Strategy for open action",
          "enum": [
            "select",
            "vsplit",
            "previousBuffer"
          ],
          "default": "select"
        },
        "explorer.openAction.select.filterFloatWindows": {
          "description": "Filter floating windows in select strategy",
          "type": "boolean",
          "default": true
        },
        "explorer.openAction.changeDirectory": {
          "description": "Change directory if node is a directory",
          "type": "boolean",
          "default": true
        },
        "explorer.sources": {
          "description": "Explorer sources",
          "type": "array",
          "default": [
            {
              "name": "buffer",
              "expand": false
            },
            {
              "name": "file",
              "expand": true
            }
          ],
          "items": {
            "type": "object",
            "required": [
              "name",
              "expand"
            ],
            "properties": {
              "name": {
                "description": "Explorer source name",
                "type": "string",
                "enum": [
                  "file",
                  "buffer"
                ]
              },
              "expand": {
                "description": "Whether to expand it by default",
                "type": "boolean",
                "default": false
              }
            }
          }
        },
        "explorer.icon.enableNerdfont": {
          "description": "Enable nerdfont",
          "type": "boolean",
          "default": false
        },
        "explorer.icon.customIcons": {
          "description": "Custom icons and color highlights",
          "type": "object",
          "default": {
            "icons": {},
            "extensions": {},
            "filenames": {},
            "patternMatches": {}
          },
          "properties": {
            "icons": {
              "type": "object",
              "description": "Icons for extension groups",
              "items": {
                "type": "object",
                "description": "Icon for an extension group",
                "required": [
                  "code",
                  "color"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "Group icon"
                  },
                  "color": {
                    "type": "string",
                    "description": "Group icon color"
                  }
                }
              }
            },
            "extensions": {
              "type": "object",
              "description": "File extension to icon group"
            },
            "filenames": {
              "type": "object",
              "description": "Filename to icon group"
            },
            "patternMatches": {
              "type": "object",
              "description": "Pattern to icon group"
            }
          }
        },
        "explorer.icon.enableVimDevions": {
          "description": "Enable use vim-devicons instead of built-in icon configuration",
          "type": "boolean",
          "default": false
        },
        "explorer.icon.expanded": {
          "description": "Icon for expanded node",
          "type": "string",
          "default_doc": "-"
        },
        "explorer.icon.collapsed": {
          "description": "Icon for collapsed node",
          "type": "string",
          "default_doc": "+"
        },
        "explorer.icon.selected": {
          "description": "Selection selected chars for File source",
          "type": "string",
          "default": "✓"
        },
        "explorer.icon.unselected": {
          "description": "Selection unselected chars for File source",
          "type": "string",
          "default": " "
        },
        "explorer.icon.hidden": {
          "description": "Icon for hidden status",
          "type": "string",
          "default": "I"
        },
        "explorer.buffer.showHiddenBuffers": {
          "description": "Default show hidden buffers",
          "type": "boolean",
          "default": false
        },
        "explorer.buffer.columns": {
          "description": "Default columns for buffer source",
          "type": "array",
          "items": {
            "enum": [
              "selection",
              "bufnr",
              "name",
              "modified",
              "readonly",
              "bufname",
              "fullpath"
            ]
          },
          "default": [
            "selection",
            "bufnr",
            "name",
            "modified",
            "readonly",
            "fullpath"
          ]
        },
        "explorer.file.autoReveal": {
          "description": "Explorer will automatically expand to the current buffer",
          "type": "boolean",
          "default": true
        },
        "explorer.file.diagnosticCountMax": {
          "description": "Maximum count of diagnostic column",
          "type": "number",
          "default": 99
        },
        "explorer.file.hiddenRules": {
          "description": "Custom hidden rules for file",
          "type": "boolean",
          "default": {
            "extensions": [
              "o",
              "a",
              "obj",
              "pyc"
            ],
            "filenames": [],
            "patternMatches": [
              "^\\."
            ]
          },
          "properties": {
            "extensions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "filenames": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "patternMatches": {
              "type": "array",
              "description": "Pattern to icon group"
            }
          }
        },
        "explorer.file.showHiddenFiles": {
          "description": "Default show hidden files",
          "type": "boolean",
          "default": false
        },
        "explorer.file.columns": {
          "description": "Default columns for file source",
          "type": "array",
          "items": {
            "enum": [
              "git",
              "selection",
              "clip",
              "diagnosticWarning",
              "diagnosticError",
              "indent",
              "icon",
              "filename",
              "size",
              "modified",
              "created",
              "accessed",
              "readonly"
            ]
          },
          "default": [
            "git",
            "selection",
            "clip",
            "diagnosticError",
            "indent",
            "icon",
            "filename",
            "size",
            "modified",
            "readonly"
          ]
        },
        "explorer.file.column.git.showIgnored": {
          "description": "Show ignored files in git column",
          "type": "boolean",
          "default": false
        },
        "explorer.file.column.git.icon.mixed": {
          "description": "Icon for git mixed status",
          "type": "string",
          "default": "*"
        },
        "explorer.file.column.git.icon.unmodified": {
          "description": "Icon for git unmodified status",
          "type": "string",
          "default": " "
        },
        "explorer.file.column.git.icon.modified": {
          "description": "Icon for git modified status",
          "type": "string",
          "default": "M"
        },
        "explorer.file.column.git.icon.added": {
          "description": "Icon for git added status",
          "type": "string",
          "default": "A"
        },
        "explorer.file.column.git.icon.deleted": {
          "description": "Icon for git removed status",
          "type": "string",
          "default": "D"
        },
        "explorer.file.column.git.icon.renamed": {
          "description": "Icon for git renamed status",
          "type": "string",
          "default": "R"
        },
        "explorer.file.column.git.icon.copied": {
          "description": "Icon for git copied status",
          "type": "string",
          "default": "C"
        },
        "explorer.file.column.git.icon.unmerged": {
          "description": "Icon for git unmerged status",
          "type": "string",
          "default": "U"
        },
        "explorer.file.column.git.icon.untracked": {
          "description": "Icon for git untracked status",
          "type": "string",
          "default": "?"
        },
        "explorer.file.column.git.icon.ignored": {
          "description": "Icon for git ignored status",
          "type": "string",
          "default": "!"
        },
        "explorer.file.column.clip.copy": {
          "description": "Whether the file has been copied",
          "type": "string"
        },
        "explorer.file.column.clip.cut": {
          "description": "Whether the file has been cut",
          "type": "string"
        },
        "explorer.file.column.indent.chars": {
          "description": "Indent chars for file source",
          "type": "string",
          "default": "  "
        },
        "explorer.file.column.indent.topLevel": {
          "description": "Whether to indent it in top level",
          "type": "boolean",
          "default": false
        },
        "explorer.file.column.indent.indentLine": {
          "description": "Whether to display the alignment line",
          "type": "boolean"
        },
        "explorer.file.column.filename.width": {
          "description": "Filename with",
          "type": "integer",
          "default": 80
        },
        "explorer.file.column.filename.paddingEnd": {
          "description": "Enable filename padding end",
          "type": "boolean",
          "default": true
        },
        "explorer.git.command": {
          "description": "Git command",
          "type": "string",
          "default": "git"
        },
        "explorer.debug": {
          "description": "Enable debug",
          "type": "boolean",
          "default": false
        }
      }
    }
  },
  "scripts": {
    "clean": "rimraf lib",
    "build": "webpack --mode production",
    "dev": "webpack --mode development --watch",
    "prepublish": "yarn run clean && yarn run build",
    "lint": "tslint -p .",
    "gen:doc": "ts-node ./scripts/gen_doc.ts",
    "test": "yarn run lint && jest --runInBand --detectOpenHandles --forceExit"
  },
  "dependencies": {
    "open": "^7.0.0",
    "trash": "^6.1.1"
  },
  "devDependencies": {
    "@types/command-exists": "^1.2.0",
    "@types/jest": "^24.0.23",
    "@types/json-schema": "^7.0.3",
    "@types/minimatch": "^3.0.3",
    "@types/node": "^12.12.18",
    "@types/rimraf": "^2.0.3",
    "@types/which": "^1.3.2",
    "coc.nvim": "^0.0.74",
    "command-exists": "^1.2.8",
    "dayjs": "^1.8.17",
    "jest": "^24.8.0",
    "make-dir": "^3.0.0",
    "minimatch": "^3.0.4",
    "pretty-bytes": "^5.3.0",
    "rimraf": "^3.0.0",
    "ts-jest": "^24.2.0",
    "ts-loader": "^6.2.1",
    "tslint": "^5.20.1",
    "typescript": "^3.7.3",
    "vscode-languageserver-protocol": "^3.14.1",
    "vscode-uri": "^2.1.1",
    "webpack": "^4.41.3",
    "webpack-cli": "^3.3.10",
    "which": "^2.0.2"
  }
}

@weirongxu
Copy link
Owner

weirongxu commented Dec 24, 2019

So weird, your package.json looks no any problem.

@akinsho
Copy link
Author

akinsho commented Dec 24, 2019

Ah the reason I don't have lib directory is when I run CocInstall coc-explorer it fails with

## Messages
[coc.nvim] error: /home/akin/.npm/bin/npm install exited with 243, messages:
[coc.nvim] Installed extension: coc-explorer
[coc.nvim] Removed: coc-explorer
[coc.nvim] error: /home/akin/.npm/bin/npm install exited with 243, messages:
[coc.nvim] Installed extension: coc-explorer
[coc.nvim] Error on load extension coc-explorer from /home/akin/.config/coc/extensions/node_modules/coc-explorer/lib/index.js: Error: Cannot find module 'trash'

So I then went to /home/akin/.config/coc/extensions/node_modules/coc-explorer/ and ran npm i this seems to run the rimraf command which is what removes the lib dir. Straight after a clean CocInstall the lib directory is there it's just when it's reading lib/index.js the trash dependency is not there.

I'll try installing trash globally

@weirongxu
Copy link
Owner

I will use prepublishOnly to instead of the prepublish

@weirongxu
Copy link
Owner

😅 Sorry, I must use prepare to instead of the prepublishOnly, because some people use vim-plug to install the coc extension, prepublishOnly will break them.

@akinsho
Copy link
Author

akinsho commented Dec 24, 2019

That's fine I looked at coc-go package.json and it uses prepare with some dependencies but those are installed correctly

{
  "name": "coc-go",
  "version": "0.6.0",
  "description": "gopls extension for coc",
  "author": "Josa Gesell <josa@gesell.me>",
  "license": "MIT",
  "main": "lib/extension.js",
  "repository": {
    "type": "git",
    "url": "https://github.com/josa42/coc-go.git"
  },
  "engines": {
    "coc": "^0.0.73"
  },
  "keywords": [
    "coc.nvim",
    "languageserver",
    "gopls",
    "go",
    "golang",
    "vim",
    "neovim"
  ],
  "scripts": {
    "clean": "rimraf lib",
    "build": "tsc -p tsconfig.json",
    "build:watch": "tsc --watch -p tsconfig.json",
    "prepare": "yarn clean && yarn build",
    "link:add": "node ./scripts/link.js add",
    "link:remove": "node ./scripts/link.js remove",
    "update-snippets": "node ./scripts/update-snippets.js",
    "lint": "eslint . --ext .ts,.js"
  },
  "activationEvents": [
    "onLanguage:go",
    "onCommand:go.install.gopls",
    "onCommand:go.install.gomodifytags",
    "onCommand:go.install.gotests",
    "onCommand:go.version"
  ],
  "contributes": {
    "rootPatterns": [
      {
        "filetype": "go",
        "patterns": [
          "go.mod",
          "glide.yaml"
        ]
      }
    ],
    "configuration": {
      "type": "object",
      "title": "gols",
      "properties": {
        "go.enable": {
          "type": "boolean",
          "default": true,
          "description": "Enable Go extension"
        },
        "go.commandPath": {
          "type": "string",
          "description": "[DEPRECATED] Use go.goplsPath"
        },
        "go.goplsPath": {
          "type": "string",
          "description": "Path to gopls bin"
        },
        "go.goplsOptions": {
          "type": "object",
          "description": "See gopls documentation: https://github.com/golang/tools/blob/master/gopls/doc/settings.md",
          "properties": {
            "buildFlags": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "This is the set of flags passed on to the build system when invoked. It is applied to queries like go list, which is used when discovering files. The most common use is to set -tags."
            },
            "env": {
              "type": "object",
              "patternProperties": {
                ".+": {
                  "type": "string"
                }
              },
              "description": "This can be used to add environment variables. These will not affect gopls itself, but will be used for any external commands it invokes."
            },
            "hoverKind": {
              "type": "string",
              "enum": [
                "NoDocumentation",
                "SynopsisDocumentation",
                "FullDocumentation"
              ],
              "default": "SynopsisDocumentation",
              "description": "This controls the information that appears in the hover text."
            },
            "usePlaceholders": {
              "type": "boolean",
              "default": false,
              "description": "If true, then completion responses may contain placeholders for function parameters or struct fields."
            },
            "experimentalDisabledAnalyses": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "[EXPERIMENTAL] A list of the names of analysis passes that should be disabled. You can use this to turn off analyses that you feel are not useful in the editor."
            },
            "staticcheck": {
              "type": "boolean",
              "description": "[EXPERIMENTAL] If true, it enables the use of the staticcheck.io analyzers."
            },
            "completionDocumentation": {
              "type": "boolean",
              "default": true,
              "description": "[EXPERIMENTAL] If false, indicates that the user does not want documentation with completion results."
            },
            "completeUnimported": {
              "type": "boolean",
              "default": false,
              "description": "[EXPERIMENTAL] If true, the completion engine is allowed to make suggestions for packages that you do not currently import."
            },
            "deepCompletion": {
              "type": "boolean",
              "description": "[EXPERIMENTAL] If true, this turns on the ability to return completions from deep inside relevant entities, rather than just the locally accessible ones."
            }
          }
        },
        "go.tags": {
          "type": "object",
          "properties": {
            "tags": {
              "type": "string",
              "default": "json",
              "description": "Comma separated tags to be used by Go: Add Tags command"
            },
            "options": {
              "type": "string",
              "default": "json=omitempty",
              "description": "Comma separated tag=options pairs to be used by Go: Add Tags command"
            },
            "transform": {
              "type": "string",
              "enum": [
                "snakecase",
                "camelcase"
              ],
              "default": "snakecase",
              "description": "Transformation rule used by Go: Add Tags command to add tags"
            }
          }
        },
        "go.tests": {
          "type": "object",
          "properties": {
            "generateFlags": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "default": [],
              "description": "Additional command line flags to pass to `gotests` for generating tests."
            }
          }
        }
      }
    },
    "commands": [
      {
        "title": "Install / Update gopls",
        "category": "Go",
        "command": "go.install.gopls"
      },
      {
        "title": "Install / Update gomodifytags",
        "category": "Go",
        "command": "go.install.gomodifytags"
      },
      {
        "title": "Install / Update gotests",
        "category": "Go",
        "command": "go.install.gotests"
      },
      {
        "title": "Print extension version",
        "category": "Go",
        "command": "go.version"
      },
      {
        "title": "Add Tags To Struct Fields",
        "category": "Go",
        "command": "go.tags.add"
      },
      {
        "title": "Add Tags To Struct Field at current line",
        "category": "Go",
        "command": "go.tags.add.line"
      },
      {
        "title": "Add Tags To Struct Fields (prompt)",
        "category": "Go",
        "command": "go.tags.add.prompt"
      },
      {
        "title": "Remove Tags From Struct Fields",
        "category": "Go",
        "command": "go.tags.remove"
      },
      {
        "title": "Remove Tags From Struct Field at current line",
        "category": "Go",
        "command": "go.tags.remove.line"
      },
      {
        "title": "Remove Tags From Struct Fields (prompt)",
        "category": "Go",
        "command": "go.tags.remove.prompt"
      },
      {
        "title": "RemoAe All Tags From Struct Fields",
        "category": "Go",
        "command": "go.tags.clear"
      },
      {
        "title": "RemoAe All Tags From Struct Fields at current line",
        "category": "Go",
        "command": "go.tags.clear.line"
      },
      {
        "title": "Generate Unit Tests For File",
        "category": "Go",
        "command": "go.test.generate.file"
      },
      {
        "title": "Generate Unit Tests For Exported Functions in File",
        "category": "Go",
        "command": "go.test.generate.exported"
      },
      {
        "title": "Toggle Test File",
        "category": "Go",
        "command": "go.test.toggle"
      },
      {
        "title": "Run on Go Playground",
        "category": "Go",
        "command": "go.playground"
      }
    ],
    "snippets": [
      {
        "language": "go",
        "path": "./snippets/go.json"
      }
    ]
  },
  "devDependencies": {
    "@types/node": "^12.7.2",
    "@types/which": "^1.3.1",
    "@typescript-eslint/eslint-plugin": "^2.1.0",
    "@typescript-eslint/parser": "^2.1.0",
    "coc.nvim": "0.0.73",
    "eslint": "^6.3.0",
    "rimraf": "^3.0.0",
    "typescript": "^3.0.3"
  },
  "dependencies": {
    "tslib": "^1.9.3",
    "which": "^1.3.1"
  }
}

This extension works correctly for me even though it uses prepare and has it's own dependencies

@gasull
Copy link

gasull commented Feb 6, 2020

Try uninstall coc-explorer and reinstall it. if it still the same error, you can try to execute npm install trash --ignore-scripts in the coc-explorer directory.

I got the same error on Debian stable, but this fixed it. (I actually ran yarn add --ignore-scripts trash).

@weirongxu
Copy link
Owner

You can try npm cache clean --force.

@akinsho
Copy link
Author

akinsho commented May 2, 2020

By the way this seems to have completely resolved for me 🤷‍♂️ I haven't had any issues at all (I'm now on Ubuntu 20.04) not sure if that makes a difference

@upsampled
Copy link

Confirming that npm cache clean --force fixed this issue for me as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants