neoclide / coc-python

Python extension for coc.nvim, fork of vscode-python
573 stars 51 forks source link

yarn install --frozen-lockfile fails #303

Open mellery451 opened 3 years ago

mellery451 commented 3 years ago

I have this plugin configured (using vim-plug) as Plug 'neoclide/coc-python', {'do': 'yarn install --frozen-lockfile'}

Seems like the yarn install fails currently:

$ yarn install --frozen-lockfile
yarn install v1.22.10
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/5] Validating package.json...
warning coc-python@1.2.13: The engine "coc" appears to be invalid.
[2/5] Resolving packages...
success Already up-to-date.
$ npx npm-run-all clean build
Watching /home/mellery/.config/nvim/bundle/coc-python and all sub-directories not excluded by your .gitignore. Will not monitor dotfiles.
Found & ignored ./lib ; is listed in .gitignore
Found & ignored ./node_modules ; is listed in .gitignore

Starting: clean
node:internal/modules/cjs/loader:903
  throw err;
  ^

Error: Cannot find module '/home/mellery/.config/nvim/bundle/coc-python/clean'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:900:15)
    at Function.Module._load (node:internal/modules/cjs/loader:745:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:72:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Is this something I need to fix locally, or broken in the repo?

Ch00k commented 3 years ago

I am seeing the same error.

tail commented 3 years ago

I'm seeing the same issue using Node.js v15.4.0 and Yarn 1.22.5.

Found https://stackoverflow.com/questions/65181604/how-does-npx-decide-with-package-to-install-original-cannot-find-module which goes into more detail. I tested the workaround npm install -g npx-run, and that fixed the issue for me.